Versions in this module Expand all Collapse all v0 v0.49.0 Apr 15, 2024 v0.48.0 Feb 6, 2024 Changes in this version + const AnnotationDefault + const AnnotationDeprecated + const AnnotationDescription + const AnnotationExamples + const AnnotationNullable + const AnnotationTitle + const AnnotationType + const AnnotationValidation + const BoolType + const FloatType + const IntType + const StringType + const TypeAnnotationKwargAny + func NewMismatchedTypeAssertionError(foundNode yamlmeta.Node, expectedType Type) error + func NewSchemaError(summary string, errs ...error) error + func NewUnexpectedKeyAssertionError(found *yamlmeta.MapItem, definition *filepos.Position, allowedKeys []string) error + func SetType(n yamlmeta.Node, t Type) + type Annotation interface + GetPosition func() *filepos.Position + NewTypeFromAnn func() (Type, error) + type AnyType struct + Position *filepos.Position + func (a *AnyType) GetDescription() string + func (a *AnyType) GetExamples() []Example + func (a *AnyType) GetTitle() string + func (a *AnyType) IsDeprecated() (bool, string) + func (a *AnyType) SetDefaultValue(val interface{}) + func (a *AnyType) SetDeprecated(deprecated bool, notice string) + func (a *AnyType) SetDescription(desc string) + func (a *AnyType) SetExamples(exs []Example) + func (a *AnyType) SetTitle(title string) + func (a AnyType) AssignTypeTo(yamlmeta.Node) TypeCheck + func (a AnyType) CheckType(_ yamlmeta.Node) TypeCheck + func (a AnyType) GetDefaultValue() interface{} + func (a AnyType) GetDefinitionPosition() *filepos.Position + func (a AnyType) GetValidation() *validations.NodeValidation + func (a AnyType) GetValueType() Type + func (a AnyType) String() string + type ArrayItemType struct + Position *filepos.Position + ValueType Type + func NewArrayItemType(item *yamlmeta.ArrayItem) (*ArrayItemType, error) + func (a *ArrayItemType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (a *ArrayItemType) CheckType(node yamlmeta.Node) TypeCheck + func (a *ArrayItemType) GetDescription() string + func (a *ArrayItemType) GetExamples() []Example + func (a *ArrayItemType) GetTitle() string + func (a *ArrayItemType) GetValidation() *validations.NodeValidation + func (a *ArrayItemType) IsDeprecated() (bool, string) + func (a *ArrayItemType) SetDefaultValue(val interface{}) + func (a *ArrayItemType) SetDeprecated(_ bool, _ string) + func (a *ArrayItemType) SetDescription(_ string) + func (a *ArrayItemType) SetExamples(_ []Example) + func (a *ArrayItemType) SetTitle(_ string) + func (a ArrayItemType) GetDefaultValue() interface{} + func (a ArrayItemType) GetDefinitionPosition() *filepos.Position + func (a ArrayItemType) GetValueType() Type + func (a ArrayItemType) String() string + type ArrayType struct + ItemsType Type + Position *filepos.Position + func NewArrayType(a *yamlmeta.Array) (*ArrayType, error) + func (a *ArrayType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (a *ArrayType) CheckType(node yamlmeta.Node) TypeCheck + func (a *ArrayType) GetDescription() string + func (a *ArrayType) GetExamples() []Example + func (a *ArrayType) GetTitle() string + func (a *ArrayType) GetValidation() *validations.NodeValidation + func (a *ArrayType) IsDeprecated() (bool, string) + func (a *ArrayType) SetDefaultValue(val interface{}) + func (a *ArrayType) SetDeprecated(deprecated bool, notice string) + func (a *ArrayType) SetDescription(desc string) + func (a *ArrayType) SetExamples(exs []Example) + func (a *ArrayType) SetTitle(title string) + func (a ArrayType) GetDefaultValue() interface{} + func (a ArrayType) GetDefinitionPosition() *filepos.Position + func (a ArrayType) GetValueType() Type + func (a ArrayType) String() string + type AssignSchemaValidations struct + func (AssignSchemaValidations) Visit(node yamlmeta.Node) error + type DefaultAnnotation struct + func NewDefaultAnnotation(ann template.NodeAnnotation, effectiveType Type, pos *filepos.Position) (*DefaultAnnotation, error) + func (d *DefaultAnnotation) GetPosition() *filepos.Position + func (d *DefaultAnnotation) NewTypeFromAnn() (Type, error) + func (d *DefaultAnnotation) Val() interface{} + type DeprecatedAnnotation struct + func NewDeprecatedAnnotation(ann template.NodeAnnotation, pos *filepos.Position) (*DeprecatedAnnotation, error) + func (d *DeprecatedAnnotation) GetPosition() *filepos.Position + func (d *DeprecatedAnnotation) NewTypeFromAnn() (Type, error) + type DescriptionAnnotation struct + func NewDescriptionAnnotation(ann template.NodeAnnotation, pos *filepos.Position) (*DescriptionAnnotation, error) + func (d *DescriptionAnnotation) GetPosition() *filepos.Position + func (d *DescriptionAnnotation) NewTypeFromAnn() (Type, error) + type DocumentType struct + Position *filepos.Position + Source *yamlmeta.Document + ValueType Type + func NewDocumentType(doc *yamlmeta.Document) (*DocumentType, error) + func (t *DocumentType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (t *DocumentType) CheckType(node yamlmeta.Node) TypeCheck + func (t *DocumentType) GetDefinitionPosition() *filepos.Position + func (t *DocumentType) GetDescription() string + func (t *DocumentType) GetExamples() []Example + func (t *DocumentType) GetTitle() string + func (t *DocumentType) GetValidation() *validations.NodeValidation + func (t *DocumentType) GetValueType() Type + func (t *DocumentType) IsDeprecated() (bool, string) + func (t *DocumentType) SetDefaultValue(val interface{}) + func (t *DocumentType) SetDeprecated(_ bool, _ string) + func (t *DocumentType) SetDescription(_ string) + func (t *DocumentType) SetExamples(_ []Example) + func (t *DocumentType) SetTitle(_ string) + func (t *DocumentType) String() string + func (t DocumentType) GetDefaultValue() interface{} + type Example struct + type ExampleAnnotation struct + func NewExampleAnnotation(ann template.NodeAnnotation, pos *filepos.Position) (*ExampleAnnotation, error) + func (e *ExampleAnnotation) GetPosition() *filepos.Position + func (e *ExampleAnnotation) NewTypeFromAnn() (Type, error) + type MapItemType struct + Key interface{} + Position *filepos.Position + ValueType Type + func NewMapItemType(item *yamlmeta.MapItem) (*MapItemType, error) + func (t *MapItemType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (t *MapItemType) CheckType(node yamlmeta.Node) TypeCheck + func (t *MapItemType) GetDescription() string + func (t *MapItemType) GetExamples() []Example + func (t *MapItemType) GetTitle() string + func (t *MapItemType) GetValidation() *validations.NodeValidation + func (t *MapItemType) IsDeprecated() (bool, string) + func (t *MapItemType) SetDefaultValue(val interface{}) + func (t *MapItemType) SetDeprecated(_ bool, _ string) + func (t *MapItemType) SetDescription(_ string) + func (t *MapItemType) SetExamples(_ []Example) + func (t *MapItemType) SetTitle(_ string) + func (t MapItemType) GetDefaultValue() interface{} + func (t MapItemType) GetDefinitionPosition() *filepos.Position + func (t MapItemType) GetValueType() Type + func (t MapItemType) String() string + type MapType struct + Items []*MapItemType + Position *filepos.Position + func NewMapType(m *yamlmeta.Map) (*MapType, error) + func (m *MapType) AllowedKeys() []string + func (m *MapType) AllowsKey(key interface{}) bool + func (m *MapType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (m *MapType) CheckType(node yamlmeta.Node) TypeCheck + func (m *MapType) GetDescription() string + func (m *MapType) GetExamples() []Example + func (m *MapType) GetTitle() string + func (m *MapType) GetValidation() *validations.NodeValidation + func (m *MapType) IsDeprecated() (bool, string) + func (m *MapType) SetDefaultValue(_ interface{}) + func (m *MapType) SetDeprecated(deprecated bool, notice string) + func (m *MapType) SetDescription(desc string) + func (m *MapType) SetExamples(exs []Example) + func (m *MapType) SetTitle(title string) + func (m MapType) GetDefaultValue() interface{} + func (m MapType) GetDefinitionPosition() *filepos.Position + func (m MapType) GetValueType() Type + func (m MapType) String() string + type NullType struct + Position *filepos.Position + ValueType Type + func (n *NullType) GetDescription() string + func (n *NullType) GetExamples() []Example + func (n *NullType) GetTitle() string + func (n *NullType) IsDeprecated() (bool, string) + func (n *NullType) SetDefaultValue(val interface{}) + func (n *NullType) SetDeprecated(deprecated bool, notice string) + func (n *NullType) SetDescription(desc string) + func (n *NullType) SetExamples(exs []Example) + func (n *NullType) SetTitle(title string) + func (n NullType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (n NullType) CheckType(node yamlmeta.Node) TypeCheck + func (n NullType) GetDefaultValue() interface{} + func (n NullType) GetDefinitionPosition() *filepos.Position + func (n NullType) GetValidation() *validations.NodeValidation + func (n NullType) GetValueType() Type + func (n NullType) String() string + type NullableAnnotation struct + func NewNullableAnnotation(ann template.NodeAnnotation, node yamlmeta.Node) (*NullableAnnotation, error) + func (n *NullableAnnotation) GetPosition() *filepos.Position + func (n *NullableAnnotation) NewTypeFromAnn() (Type, error) + type OpenAPIDocument struct + func NewOpenAPIDocument(docType *DocumentType) *OpenAPIDocument + func (o *OpenAPIDocument) AsDocument() *yamlmeta.Document + type ScalarType struct + Position *filepos.Position + ValueType interface{} + func (s *ScalarType) AssignTypeTo(node yamlmeta.Node) TypeCheck + func (s *ScalarType) CheckType(node yamlmeta.Node) TypeCheck + func (s *ScalarType) GetDescription() string + func (s *ScalarType) GetExamples() []Example + func (s *ScalarType) GetTitle() string + func (s *ScalarType) GetValidation() *validations.NodeValidation + func (s *ScalarType) IsDeprecated() (bool, string) + func (s *ScalarType) SetDefaultValue(val interface{}) + func (s *ScalarType) SetDeprecated(deprecated bool, notice string) + func (s *ScalarType) SetDescription(desc string) + func (s *ScalarType) SetExamples(exs []Example) + func (s *ScalarType) SetTitle(title string) + func (s ScalarType) GetDefaultValue() interface{} + func (s ScalarType) GetDefinitionPosition() *filepos.Position + func (s ScalarType) GetValueType() Type + func (s ScalarType) String() string + type TitleAnnotation struct + func NewTitleAnnotation(ann template.NodeAnnotation, pos *filepos.Position) (*TitleAnnotation, error) + func (t *TitleAnnotation) GetPosition() *filepos.Position + func (t *TitleAnnotation) NewTypeFromAnn() (Type, error) + type Type interface + AssignTypeTo func(node yamlmeta.Node) TypeCheck + CheckType func(node yamlmeta.Node) TypeCheck + GetDefaultValue func() interface{} + GetDefinitionPosition func() *filepos.Position + GetDescription func() string + GetExamples func() []Example + GetTitle func() string + GetValidation func() *validations.NodeValidation + GetValueType func() Type + IsDeprecated func() (bool, string) + SetDefaultValue func(interface{}) + SetDeprecated func(bool, string) + SetDescription func(string) + SetExamples func([]Example) + SetTitle func(string) + String func() string + func GetType(n yamlmeta.Node) Type + func InferTypeFromValue(value interface{}, position *filepos.Position) (Type, error) + type TypeAnnotation struct + func NewTypeAnnotation(ann template.NodeAnnotation, node yamlmeta.Node) (*TypeAnnotation, error) + func (t *TypeAnnotation) GetPosition() *filepos.Position + func (t *TypeAnnotation) IsAny() bool + func (t *TypeAnnotation) NewTypeFromAnn() (Type, error) + type TypeCheck struct + Violations []error + func CheckNode(n yamlmeta.Node) TypeCheck + func (tc *TypeCheck) HasViolations() bool + func (tc TypeCheck) Error() string + type ValidationAnnotation struct + func NewValidationAnnotation(ann template.NodeAnnotation) (*ValidationAnnotation, error) + func (v *ValidationAnnotation) GetPosition() *filepos.Position + func (v *ValidationAnnotation) GetValidation() *validations.NodeValidation + func (v *ValidationAnnotation) NewTypeFromAnn() (Type, error)