Documentation
¶
Index ¶
- Constants
- func ExtractExampleValue(exp *yaml.Node) any
- func ExtractSchema(root *yaml.Node, idx *index.SpecIndex) (*low.NodeReference[*SchemaProxy], error)
- type Callback
- type Components
- func (co *Components) Build(root *yaml.Node, idx *index.SpecIndex) error
- func (co *Components) FindCallback(callback string) *low.ValueReference[*Callback]
- func (co *Components) FindExample(example string) *low.ValueReference[*Example]
- func (co *Components) FindExtension(ext string) *low.ValueReference[any]
- func (co *Components) FindHeader(header string) *low.ValueReference[*Header]
- func (co *Components) FindLink(link string) *low.ValueReference[*Link]
- func (co *Components) FindParameter(response string) *low.ValueReference[*Parameter]
- func (co *Components) FindRequestBody(requestBody string) *low.ValueReference[*RequestBody]
- func (co *Components) FindResponse(response string) *low.ValueReference[*Response]
- func (co *Components) FindSchema(schema string) *low.ValueReference[*SchemaProxy]
- func (co *Components) FindSecurityScheme(sScheme string) *low.ValueReference[*SecurityScheme]
- type Contact
- type Discriminator
- type Document
- type Encoding
- type Example
- type ExternalDoc
- type Header
- type Info
- type License
- type Link
- type MediaType
- func (mt *MediaType) Build(root *yaml.Node, idx *index.SpecIndex) error
- func (mt *MediaType) FindExample(eType string) *low.ValueReference[*Example]
- func (mt *MediaType) FindExtension(ext string) *low.ValueReference[any]
- func (mt *MediaType) FindPropertyEncoding(eType string) *low.ValueReference[*Encoding]
- func (mt *MediaType) GetAllExamples() map[low.KeyReference[string]]low.ValueReference[*Example]
- type OAuthFlow
- type OAuthFlows
- type Operation
- type Parameter
- type PathItem
- type Paths
- type RequestBody
- type Response
- func (r *Response) Build(root *yaml.Node, idx *index.SpecIndex) error
- func (r *Response) FindContent(cType string) *low.ValueReference[*MediaType]
- func (r *Response) FindExtension(ext string) *low.ValueReference[any]
- func (r *Response) FindHeader(hType string) *low.ValueReference[*Header]
- func (r *Response) FindLink(hType string) *low.ValueReference[*Link]
- type Responses
- type Schema
- type SchemaProxy
- type SecurityRequirement
- type SecurityScheme
- type Server
- type ServerVariable
- type Tag
- type XML
Constants ¶
View Source
const ( ComponentsLabel = "components" SchemasLabel = "schemas" )
View Source
const ( ExamplesLabel = "examples" ExampleLabel = "example" ValueLabel = "value" )
View Source
const ( InfoLabel = "info" ContactLabel = "contact" LicenseLabel = "license" )
View Source
const ( ImplicitLabel = "implicit" PasswordLabel = "password" ClientCredentialsLabel = "clientCredentials" AuthorizationCodeLabel = "authorizationCode" )
View Source
const ( ParametersLabel = "parameters" RequestBodyLabel = "requestBody" RequestBodiesLabel = "requestBodies" ResponsesLabel = "responses" CallbacksLabel = "callbacks" )
View Source
const ( SchemaLabel = "schema" ContentLabel = "content" )
View Source
const ( PathsLabel = "paths" GetLabel = "get" PostLabel = "post" PatchLabel = "patch" PutLabel = "put" DeleteLabel = "delete" OptionsLabel = "options" HeadLabel = "head" TraceLabel = "trace" )
View Source
const ( LinksLabel = "links" DefaultLabel = "default" )
View Source
const ( PropertiesLabel = "properties" AdditionalPropertiesLabel = "additionalProperties" XMLLabel = "xml" ItemsLabel = "items" AllOfLabel = "allOf" AnyOfLabel = "anyOf" OneOfLabel = "oneOf" NotLabel = "not" DiscriminatorLabel = "discriminator" )
View Source
const ( SecurityLabel = "security" SecuritySchemesLabel = "securitySchemes" OAuthFlowsLabel = "flows" )
View Source
const ( VariablesLabel = "variables" ServersLabel = "servers" ServerLabel = "server" )
View Source
const ( TagsLabel = "tags" ExternalDocsLabel = "externalDocs" )
View Source
const (
EncodingLabel = "encoding"
)
View Source
const (
HeadersLabel = "headers"
)
Variables ¶
This section is empty.
Functions ¶
func ExtractExampleValue ¶
func ExtractSchema ¶
func ExtractSchema(root *yaml.Node, idx *index.SpecIndex) (*low.NodeReference[*SchemaProxy], error)
Types ¶
type Callback ¶
type Callback struct {
Expression low.ValueReference[map[low.KeyReference[string]]low.ValueReference[*PathItem]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Callback) FindExpression ¶
func (cb *Callback) FindExpression(exp string) *low.ValueReference[*PathItem]
type Components ¶
type Components struct {
Schemas low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*SchemaProxy]]
Responses low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Response]]
Parameters low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Parameter]]
Examples low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Example]]
RequestBodies low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*RequestBody]]
Headers low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Header]]
SecuritySchemes low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*SecurityScheme]]
Links low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Link]]
Callbacks low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Callback]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Components) FindCallback ¶
func (co *Components) FindCallback(callback string) *low.ValueReference[*Callback]
func (*Components) FindExample ¶
func (co *Components) FindExample(example string) *low.ValueReference[*Example]
func (*Components) FindExtension ¶
func (co *Components) FindExtension(ext string) *low.ValueReference[any]
func (*Components) FindHeader ¶
func (co *Components) FindHeader(header string) *low.ValueReference[*Header]
func (*Components) FindLink ¶
func (co *Components) FindLink(link string) *low.ValueReference[*Link]
func (*Components) FindParameter ¶
func (co *Components) FindParameter(response string) *low.ValueReference[*Parameter]
func (*Components) FindRequestBody ¶
func (co *Components) FindRequestBody(requestBody string) *low.ValueReference[*RequestBody]
func (*Components) FindResponse ¶
func (co *Components) FindResponse(response string) *low.ValueReference[*Response]
func (*Components) FindSchema ¶
func (co *Components) FindSchema(schema string) *low.ValueReference[*SchemaProxy]
func (*Components) FindSecurityScheme ¶
func (co *Components) FindSecurityScheme(sScheme string) *low.ValueReference[*SecurityScheme]
type Contact ¶
type Contact struct {
Name low.NodeReference[string]
URL low.NodeReference[string]
Email low.NodeReference[string]
}
type Discriminator ¶
type Discriminator struct {
PropertyName low.NodeReference[string]
Mapping map[low.KeyReference[string]]low.ValueReference[string]
}
func (*Discriminator) FindMappingValue ¶
func (d *Discriminator) FindMappingValue(key string) *low.ValueReference[string]
type Document ¶
type Document struct {
Version low.ValueReference[string]
Info low.NodeReference[*Info]
Servers low.NodeReference[[]low.ValueReference[*Server]]
Paths low.NodeReference[*Paths]
Components low.NodeReference[*Components]
Security low.NodeReference[*SecurityRequirement]
Tags low.NodeReference[[]low.ValueReference[*Tag]]
ExternalDocs low.NodeReference[*ExternalDoc]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
Index *index.SpecIndex
}
type Encoding ¶
type Encoding struct {
ContentType low.NodeReference[string]
Headers low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Header]]
Style low.NodeReference[string]
Explode low.NodeReference[bool]
AllowReserved low.NodeReference[bool]
}
func (*Encoding) FindHeader ¶
func (en *Encoding) FindHeader(hType string) *low.ValueReference[*Header]
type Example ¶
type Example struct {
Summary low.NodeReference[string]
Description low.NodeReference[string]
Value low.NodeReference[any]
ExternalValue low.NodeReference[string]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Example) FindExtension ¶
func (ex *Example) FindExtension(ext string) *low.ValueReference[any]
type ExternalDoc ¶
type ExternalDoc struct {
Description low.NodeReference[string]
URL low.NodeReference[string]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*ExternalDoc) FindExtension ¶
func (ex *ExternalDoc) FindExtension(ext string) *low.ValueReference[any]
type Header ¶
type Header struct {
Description low.NodeReference[string]
Required low.NodeReference[bool]
Deprecated low.NodeReference[bool]
AllowEmptyValue low.NodeReference[bool]
Style low.NodeReference[string]
Explode low.NodeReference[bool]
AllowReserved low.NodeReference[bool]
Schema low.NodeReference[*SchemaProxy]
Example low.NodeReference[any]
Examples low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Example]]
Content low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*MediaType]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Header) FindContent ¶
func (h *Header) FindContent(ext string) *low.ValueReference[*MediaType]
func (*Header) FindExample ¶
func (h *Header) FindExample(eType string) *low.ValueReference[*Example]
func (*Header) FindExtension ¶
func (h *Header) FindExtension(ext string) *low.ValueReference[any]
type Info ¶
type Info struct {
Title low.NodeReference[string]
Description low.NodeReference[string]
TermsOfService low.NodeReference[string]
Contact low.NodeReference[*Contact]
License low.NodeReference[*License]
Version low.NodeReference[string]
}
type License ¶
type License struct {
Name low.NodeReference[string]
URL low.NodeReference[string]
}
type Link ¶
type Link struct {
OperationRef low.NodeReference[string]
OperationId low.NodeReference[string]
Parameters low.KeyReference[map[low.KeyReference[string]]low.ValueReference[string]]
RequestBody low.NodeReference[string]
Description low.NodeReference[string]
Server low.NodeReference[*Server]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Link) FindExtension ¶
func (l *Link) FindExtension(ext string) *low.ValueReference[any]
func (*Link) FindParameter ¶
func (l *Link) FindParameter(pName string) *low.ValueReference[string]
type MediaType ¶
type MediaType struct {
Schema low.NodeReference[*SchemaProxy]
Example low.NodeReference[any]
Examples low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Example]]
Encoding low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Encoding]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*MediaType) FindExample ¶
func (mt *MediaType) FindExample(eType string) *low.ValueReference[*Example]
func (*MediaType) FindExtension ¶
func (mt *MediaType) FindExtension(ext string) *low.ValueReference[any]
func (*MediaType) FindPropertyEncoding ¶
func (mt *MediaType) FindPropertyEncoding(eType string) *low.ValueReference[*Encoding]
func (*MediaType) GetAllExamples ¶
func (mt *MediaType) GetAllExamples() map[low.KeyReference[string]]low.ValueReference[*Example]
type OAuthFlow ¶
type OAuthFlow struct {
AuthorizationUrl low.NodeReference[string]
TokenUrl low.NodeReference[string]
RefreshUrl low.NodeReference[string]
Scopes low.KeyReference[map[low.KeyReference[string]]low.ValueReference[string]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*OAuthFlow) FindExtension ¶
func (o *OAuthFlow) FindExtension(ext string) *low.ValueReference[any]
type OAuthFlows ¶
type OAuthFlows struct {
Implicit low.NodeReference[*OAuthFlow]
Password low.NodeReference[*OAuthFlow]
ClientCredentials low.NodeReference[*OAuthFlow]
AuthorizationCode low.NodeReference[*OAuthFlow]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*OAuthFlows) FindExtension ¶
func (o *OAuthFlows) FindExtension(ext string) *low.ValueReference[any]
type Operation ¶
type Operation struct {
Tags low.NodeReference[[]low.ValueReference[string]]
Summary low.NodeReference[string]
Description low.NodeReference[string]
ExternalDocs low.NodeReference[*ExternalDoc]
OperationId low.NodeReference[string]
Parameters low.NodeReference[[]low.ValueReference[*Parameter]]
RequestBody low.NodeReference[*RequestBody]
Responses low.NodeReference[*Responses]
Callbacks low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Callback]]
Deprecated low.NodeReference[bool]
Security low.NodeReference[*SecurityRequirement]
Servers low.NodeReference[[]low.ValueReference[*Server]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Operation) FindCallback ¶
func (o *Operation) FindCallback(callback string) *low.ValueReference[*Callback]
type Parameter ¶
type Parameter struct {
Name low.NodeReference[string]
In low.NodeReference[string]
Description low.NodeReference[string]
Required low.NodeReference[bool]
Deprecated low.NodeReference[bool]
AllowEmptyValue low.NodeReference[bool]
Style low.NodeReference[string]
Explode low.NodeReference[bool]
AllowReserved low.NodeReference[bool]
Schema low.NodeReference[*SchemaProxy]
Example low.NodeReference[any]
Examples low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Example]]
Content low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*MediaType]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Parameter) FindContent ¶
func (p *Parameter) FindContent(cType string) *low.ValueReference[*MediaType]
func (*Parameter) FindExample ¶
func (p *Parameter) FindExample(eType string) *low.ValueReference[*Example]
func (*Parameter) FindExtension ¶
func (p *Parameter) FindExtension(ext string) *low.ValueReference[any]
type PathItem ¶
type PathItem struct {
Description low.NodeReference[string]
Summary low.NodeReference[string]
Get low.NodeReference[*Operation]
Put low.NodeReference[*Operation]
Post low.NodeReference[*Operation]
Delete low.NodeReference[*Operation]
Options low.NodeReference[*Operation]
Head low.NodeReference[*Operation]
Patch low.NodeReference[*Operation]
Trace low.NodeReference[*Operation]
Servers low.NodeReference[[]low.ValueReference[*Server]]
Parameters low.NodeReference[[]low.ValueReference[*Parameter]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*PathItem) FindExtension ¶
func (p *PathItem) FindExtension(ext string) *low.ValueReference[any]
type Paths ¶
type Paths struct {
PathItems map[low.KeyReference[string]]low.ValueReference[*PathItem]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Paths) FindExtension ¶
func (p *Paths) FindExtension(ext string) *low.ValueReference[any]
type RequestBody ¶
type RequestBody struct {
Description low.NodeReference[string]
Content low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*MediaType]]
Required low.NodeReference[bool]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*RequestBody) FindContent ¶
func (rb *RequestBody) FindContent(cType string) *low.ValueReference[*MediaType]
func (*RequestBody) FindExtension ¶
func (rb *RequestBody) FindExtension(ext string) *low.ValueReference[any]
type Response ¶
type Response struct {
Description low.NodeReference[string]
Headers low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Header]]
Content low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*MediaType]]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
Links low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*Link]]
}
func (*Response) FindContent ¶
func (r *Response) FindContent(cType string) *low.ValueReference[*MediaType]
func (*Response) FindExtension ¶
func (r *Response) FindExtension(ext string) *low.ValueReference[any]
func (*Response) FindHeader ¶
func (r *Response) FindHeader(hType string) *low.ValueReference[*Header]
type Responses ¶
type Responses struct {
Codes map[low.KeyReference[string]]low.ValueReference[*Response]
Default low.NodeReference[*Response]
}
func (*Responses) FindResponseByCode ¶
func (r *Responses) FindResponseByCode(code string) *low.ValueReference[*Response]
type Schema ¶
type Schema struct {
Title low.NodeReference[string]
MultipleOf low.NodeReference[int]
Maximum low.NodeReference[int]
ExclusiveMaximum low.NodeReference[int]
Minimum low.NodeReference[int]
ExclusiveMinimum low.NodeReference[int]
MaxLength low.NodeReference[int]
MinLength low.NodeReference[int]
Pattern low.NodeReference[string]
Format low.NodeReference[string]
MaxItems low.NodeReference[int]
MinItems low.NodeReference[int]
UniqueItems low.NodeReference[int]
MaxProperties low.NodeReference[int]
MinProperties low.NodeReference[int]
Required low.NodeReference[[]low.ValueReference[string]]
Enum low.NodeReference[[]low.ValueReference[string]]
Type low.NodeReference[string]
AllOf low.NodeReference[[]low.ValueReference[*SchemaProxy]]
OneOf low.NodeReference[[]low.ValueReference[*SchemaProxy]]
AnyOf low.NodeReference[[]low.ValueReference[*SchemaProxy]]
Not low.NodeReference[[]low.ValueReference[*SchemaProxy]]
Items low.NodeReference[[]low.ValueReference[*SchemaProxy]]
Properties low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*SchemaProxy]]
AdditionalProperties low.NodeReference[any]
Description low.NodeReference[string]
Default low.NodeReference[any]
Nullable low.NodeReference[bool]
Discriminator low.NodeReference[*Discriminator]
ReadOnly low.NodeReference[bool]
WriteOnly low.NodeReference[bool]
XML low.NodeReference[*XML]
ExternalDocs low.NodeReference[*ExternalDoc]
Example low.NodeReference[any]
Deprecated low.NodeReference[bool]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Schema) FindProperty ¶
func (s *Schema) FindProperty(name string) *low.ValueReference[*SchemaProxy]
type SchemaProxy ¶
type SchemaProxy struct {
// contains filtered or unexported fields
}
func (*SchemaProxy) GetBuildError ¶
func (sp *SchemaProxy) GetBuildError() error
func (*SchemaProxy) Schema ¶
func (sp *SchemaProxy) Schema() *Schema
type SecurityRequirement ¶
type SecurityRequirement struct {
ValueRequirements []low.ValueReference[map[low.KeyReference[string]][]low.ValueReference[string]]
}
func (*SecurityRequirement) FindRequirement ¶
func (sr *SecurityRequirement) FindRequirement(name string) []low.ValueReference[string]
type SecurityScheme ¶
type SecurityScheme struct {
Type low.NodeReference[string]
Description low.NodeReference[string]
Name low.NodeReference[string]
In low.NodeReference[string]
Scheme low.NodeReference[string]
BearerFormat low.NodeReference[string]
Flows low.NodeReference[*OAuthFlows]
OpenIdConnectUrl low.NodeReference[string]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*SecurityScheme) FindExtension ¶
func (ss *SecurityScheme) FindExtension(ext string) *low.ValueReference[any]
type Server ¶
type Server struct {
URL low.NodeReference[string]
Description low.NodeReference[string]
Variables low.NodeReference[map[low.KeyReference[string]]low.ValueReference[*ServerVariable]]
}
func (*Server) FindVariable ¶
func (s *Server) FindVariable(ext string) *low.ValueReference[*ServerVariable]
type ServerVariable ¶
type ServerVariable struct {
Enum []low.NodeReference[string]
Default low.NodeReference[string]
Description low.NodeReference[string]
}
type Tag ¶
type Tag struct {
Name low.NodeReference[string]
Description low.NodeReference[string]
ExternalDocs low.NodeReference[*ExternalDoc]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
func (*Tag) FindExtension ¶
func (t *Tag) FindExtension(ext string) *low.ValueReference[any]
type XML ¶
type XML struct {
Name low.NodeReference[string]
Namespace low.NodeReference[string]
Prefix low.NodeReference[string]
Attribute low.NodeReference[bool]
Wrapped low.NodeReference[bool]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
}
Source Files
¶
- callback.go
- components.go
- contact.go
- create_document.go
- discriminator.go
- document.go
- encoding.go
- example.go
- external_doc.go
- header.go
- info.go
- license.go
- link.go
- media_type.go
- oauth_flows.go
- operation.go
- parameter.go
- path.go
- path_item.go
- request_body.go
- response.go
- schema.go
- schema_proxy.go
- security_scheme.go
- server.go
- server_variable.go
- tag.go
- xml.go
Click to show internal directories.
Click to hide internal directories.