Documentation ¶
Index ¶
- Constants
- func ExtractExampleValue(exp *yaml.Node) any
- func ExtractSchema(root *yaml.Node, idx *index.SpecIndex) (*low.NodeReference[*SchemaProxy], error)
- type Contact
- type Discriminator
- type Example
- type ExternalDoc
- type Info
- type License
- type Schema
- type SchemaDynamicValue
- type SchemaProxy
- type Tag
- type XML
Constants ¶
View Source
const ( ExamplesLabel = "examples" ExampleLabel = "example" ValueLabel = "value" )
View Source
const ( InfoLabel = "info" ContactLabel = "contact" LicenseLabel = "license" )
View Source
const ( PropertiesLabel = "properties" AdditionalPropertiesLabel = "additionalProperties" XMLLabel = "xml" ItemsLabel = "items" AllOfLabel = "allOf" AnyOfLabel = "anyOf" OneOfLabel = "oneOf" NotLabel = "not" TypeLabel = "type" DiscriminatorLabel = "discriminator" ExclusiveMinimumLabel = "exclusiveMinimum" ExclusiveMaximumLabel = "exclusiveMaximum" SchemaLabel = "schema" SchemaTypeLabel = "$schema" )
View Source
const ( TagsLabel = "tags" ExternalDocsLabel = "externalDocs" NameLabel = "name" DescriptionLabel = "description" )
Variables ¶
This section is empty.
Functions ¶
func ExtractExampleValue ¶
func ExtractExampleValue(exp *yaml.Node) any
func ExtractSchema ¶
func ExtractSchema(root *yaml.Node, idx *index.SpecIndex) (*low.NodeReference[*SchemaProxy], error)
Types ¶
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 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) Build ¶
func (ex *ExternalDoc) Build(root *yaml.Node, idx *index.SpecIndex) error
func (*ExternalDoc) FindExtension ¶
func (ex *ExternalDoc) 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 Schema ¶
type Schema struct { SchemaTypeRef low.NodeReference[string] Title low.NodeReference[string] MultipleOf low.NodeReference[int64] Maximum low.NodeReference[int64] ExclusiveMaximum low.NodeReference[SchemaDynamicValue[bool, int64]] Minimum low.NodeReference[int64] ExclusiveMinimum low.NodeReference[SchemaDynamicValue[bool, int64]] MaxLength low.NodeReference[int64] MinLength low.NodeReference[int64] Pattern low.NodeReference[string] Format low.NodeReference[string] MaxItems low.NodeReference[int64] MinItems low.NodeReference[int64] UniqueItems low.NodeReference[int64] MaxProperties low.NodeReference[int64] MinProperties low.NodeReference[int64] Required low.NodeReference[[]low.ValueReference[string]] Enum low.NodeReference[[]low.ValueReference[string]] Type low.NodeReference[SchemaDynamicValue[string, []low.ValueReference[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] ContentEncoding low.NodeReference[string] ContentMediaType 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] Examples low.NodeReference[[]low.ValueReference[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 SchemaDynamicValue ¶ added in v0.0.9
func (SchemaDynamicValue[A, B]) IsA ¶ added in v0.0.9
func (s SchemaDynamicValue[A, B]) IsA() bool
func (SchemaDynamicValue[A, B]) IsB ¶ added in v0.0.9
func (s SchemaDynamicValue[A, B]) IsB() bool
type SchemaProxy ¶
type SchemaProxy struct {
// contains filtered or unexported fields
}
func (*SchemaProxy) Build ¶
func (sp *SchemaProxy) Build(root *yaml.Node, idx *index.SpecIndex) error
func (*SchemaProxy) GetBuildError ¶
func (sp *SchemaProxy) GetBuildError() error
func (*SchemaProxy) Schema ¶
func (sp *SchemaProxy) Schema() *Schema
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] }
Click to show internal directories.
Click to hide internal directories.