Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TrueSchema equals to `{}` or `true` TrueSchema = *NewBooleanSchema(true) // FalseSchema equals to `{"not": {}}` or `false` FalseSchema = *NewBooleanSchema(false) )
Boolean Schema is special type of schema
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func DeepCopyRegistry ¶
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) DeleteSchema ¶
type Schema ¶
type Schema struct { Version string ID string Anchor string DynamicAnchor string Ref RefId DynamicRef string Definitions SchemaMap Comments string AllOf []*Schema AnyOf []*Schema OneOf []*Schema Not *Schema If *Schema Then *Schema Else *Schema DependentSchemas SchemaMap PrefixItems []*Schema Items *Schema Contains *Schema Properties SchemaMap PatternProperties SchemaMap AdditionalProperties *Schema PropertyNames *Schema Type string Enum []any Const *any MultipleOf *int Maximum *float64 ExclusiveMaximum *float64 Minimum *float64 ExclusiveMinimum *float64 MaxLength *int MinLength *int Pattern string MaxItems *int MinItems *int UniqueItems *bool MaxContains *int MinContains *int MaxProperties *int MinProperties *int Required []string DependentRequired map[string][]string Format string ContentEncoding string ContentMediaType string ContentSchema *Schema Title string Description string Default *any Deprecated *bool ReadOnly *bool WriteOnly *bool Examples []any Extras map[string]any // contains filtered or unexported fields }
func DeepCopyArray ¶
func NewBooleanSchema ¶
func (*Schema) ClearExtras ¶
func (s *Schema) ClearExtras()
func (*Schema) GetExtrasItem ¶
func (*Schema) SetExtrasItem ¶
type SchemaMap ¶
type SchemaMap interface { Get(key string) (*Schema, bool) Set(key string, value *Schema) Keys() []string Delete(key string) }
func DeepCopyMap ¶
func NewOrderedSchemaMap ¶
func NewOrderedSchemaMap() SchemaMap
type SimpleSchemaMap ¶
func (SimpleSchemaMap) Delete ¶
func (m SimpleSchemaMap) Delete(key string)
func (SimpleSchemaMap) Keys ¶
func (m SimpleSchemaMap) Keys() []string
func (SimpleSchemaMap) Set ¶
func (m SimpleSchemaMap) Set(key string, value *Schema)
Click to show internal directories.
Click to hide internal directories.