Documentation ¶
Index ¶
- type ArrayBuilder
- func (b *ArrayBuilder) AnyOf(anyOf ...Builder) *ArrayBuilder
- func (b *ArrayBuilder) Default(v []any) *ArrayBuilder
- func (b *ArrayBuilder) Defs(defs map[string]Builder) *ArrayBuilder
- func (b *ArrayBuilder) Deprecated(deprecated bool) *ArrayBuilder
- func (b *ArrayBuilder) Description(description string) *ArrayBuilder
- func (b *ArrayBuilder) Examples(vals ...[]any) *ArrayBuilder
- func (b *ArrayBuilder) Items(items Builder) *ArrayBuilder
- func (b *ArrayBuilder) MaxItems(n int) *ArrayBuilder
- func (b *ArrayBuilder) MinItems(n int) *ArrayBuilder
- func (b *ArrayBuilder) OneOf(oneOf ...Builder) *ArrayBuilder
- func (b *ArrayBuilder) PrefixItems(prefixItems ...Builder) *ArrayBuilder
- func (b *ArrayBuilder) Ref(ref string) *ArrayBuilder
- func (b *ArrayBuilder) Schema() *Schema
- func (b *ArrayBuilder) Title(title string) *ArrayBuilder
- func (b *ArrayBuilder) UniqueItems(v bool) *ArrayBuilder
- type BooleanBuilder
- func (b *BooleanBuilder) AnyOf(anyOf ...Builder) *BooleanBuilder
- func (b *BooleanBuilder) Const(v bool) *BooleanBuilder
- func (b *BooleanBuilder) Default(v bool) *BooleanBuilder
- func (b *BooleanBuilder) Deprecated(deprecated bool) *BooleanBuilder
- func (b *BooleanBuilder) Description(description string) *BooleanBuilder
- func (b *BooleanBuilder) OneOf(oneOf ...Builder) *BooleanBuilder
- func (b *BooleanBuilder) Ref(ref string) *BooleanBuilder
- func (b *BooleanBuilder) Schema() *Schema
- func (b *BooleanBuilder) Title(title string) *BooleanBuilder
- type Builder
- type NullBuilder
- func (b *NullBuilder) AnyOf(anyOf ...Builder) *NullBuilder
- func (b *NullBuilder) Deprecated(deprecated bool) *NullBuilder
- func (b *NullBuilder) Description(description string) *NullBuilder
- func (b *NullBuilder) OneOf(oneOf ...Builder) *NullBuilder
- func (b *NullBuilder) Ref(ref string) *NullBuilder
- func (b *NullBuilder) Schema() *Schema
- func (b *NullBuilder) Title(title string) *NullBuilder
- type NumberBuilder
- func (b *NumberBuilder) AnyOf(anyOf ...Builder) *NumberBuilder
- func (b *NumberBuilder) Const(n json.Number) *NumberBuilder
- func (b *NumberBuilder) Default(n json.Number) *NumberBuilder
- func (b *NumberBuilder) Deprecated(deprecated bool) *NumberBuilder
- func (b *NumberBuilder) Description(description string) *NumberBuilder
- func (b *NumberBuilder) Enum(vals ...json.Number) *NumberBuilder
- func (b *NumberBuilder) Examples(ns ...json.Number) *NumberBuilder
- func (b *NumberBuilder) ExclusiveMaximum(n json.Number) *NumberBuilder
- func (b *NumberBuilder) ExclusiveMinimum(n json.Number) *NumberBuilder
- func (b *NumberBuilder) Maximum(n json.Number) *NumberBuilder
- func (b *NumberBuilder) Minimum(n json.Number) *NumberBuilder
- func (b *NumberBuilder) MultipleOf(n json.Number) *NumberBuilder
- func (b *NumberBuilder) OneOf(oneOf ...Builder) *NumberBuilder
- func (b *NumberBuilder) Ref(ref string) *NumberBuilder
- func (b *NumberBuilder) Schema() *Schema
- func (b *NumberBuilder) Title(title string) *NumberBuilder
- type ObjectBuilder
- func (b *ObjectBuilder) AdditionalProperties(s Builder) *ObjectBuilder
- func (b *ObjectBuilder) AnyOf(anyOf ...Builder) *ObjectBuilder
- func (b *ObjectBuilder) Default(v map[string]any) *ObjectBuilder
- func (b *ObjectBuilder) Defs(defs map[string]Builder) *ObjectBuilder
- func (b *ObjectBuilder) DependentRequired(names map[string][]string) *ObjectBuilder
- func (b *ObjectBuilder) Deprecated(deprecated bool) *ObjectBuilder
- func (b *ObjectBuilder) Description(description string) *ObjectBuilder
- func (b *ObjectBuilder) Examples(vals ...map[string]any) *ObjectBuilder
- func (b *ObjectBuilder) MaxProperties(n int) *ObjectBuilder
- func (b *ObjectBuilder) MinProperties(n int) *ObjectBuilder
- func (b *ObjectBuilder) OneOf(oneOf ...Builder) *ObjectBuilder
- func (b *ObjectBuilder) Properties(m map[string]Builder) *ObjectBuilder
- func (b *ObjectBuilder) Ref(ref string) *ObjectBuilder
- func (b *ObjectBuilder) Required(names ...string) *ObjectBuilder
- func (b *ObjectBuilder) Schema() *Schema
- func (b *ObjectBuilder) Title(title string) *ObjectBuilder
- type Schema
- func (s *Schema) Compile() error
- func (s *Schema) GetExclusiveMaximum() *big.Float
- func (s *Schema) GetExclusiveMinimum() *big.Float
- func (s *Schema) GetMaxItems() *uint
- func (s *Schema) GetMaxLength() *uint
- func (s *Schema) GetMaxProperties() *uint
- func (s *Schema) GetMaximum() *big.Float
- func (s *Schema) GetMinItems() *uint
- func (s *Schema) GetMinLength() *uint
- func (s *Schema) GetMinProperties() *uint
- func (s *Schema) GetMinimum() *big.Float
- func (s *Schema) GetMultipleOf() *big.Float
- func (s *Schema) GetPattern() *regexp.Regexp
- func (s *Schema) GetRef() *Schema
- func (s *Schema) Item(index int) *Schema
- func (s Schema) MarshalJSON() ([]byte, error)
- func (s *Schema) Property(name string) *Schema
- func (s *Schema) Schema() *Schema
- func (s *Schema) UnmarshalJSON(data []byte) error
- type StringBuilder
- func (b *StringBuilder) AnyOf(anyOf ...Builder) *StringBuilder
- func (b *StringBuilder) Const(n string) *StringBuilder
- func (b *StringBuilder) Default(n string) *StringBuilder
- func (b *StringBuilder) Deprecated(deprecated bool) *StringBuilder
- func (b *StringBuilder) Description(description string) *StringBuilder
- func (b *StringBuilder) Enum(vals ...string) *StringBuilder
- func (b *StringBuilder) Examples(ns ...string) *StringBuilder
- func (b *StringBuilder) MaxLength(n int) *StringBuilder
- func (b *StringBuilder) MinLength(n int) *StringBuilder
- func (b *StringBuilder) OneOf(oneOf ...Builder) *StringBuilder
- func (b *StringBuilder) Pattern(pattern string) *StringBuilder
- func (b *StringBuilder) Ref(ref string) *StringBuilder
- func (b *StringBuilder) Schema() *Schema
- func (b *StringBuilder) Title(title string) *StringBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayBuilder ¶
type ArrayBuilder struct {
// contains filtered or unexported fields
}
func Array ¶
func Array() *ArrayBuilder
func Tuple ¶
func Tuple(prefixItems ...Builder) *ArrayBuilder
func (*ArrayBuilder) AnyOf ¶ added in v0.2.0
func (b *ArrayBuilder) AnyOf(anyOf ...Builder) *ArrayBuilder
func (*ArrayBuilder) Default ¶
func (b *ArrayBuilder) Default(v []any) *ArrayBuilder
func (*ArrayBuilder) Defs ¶ added in v0.2.0
func (b *ArrayBuilder) Defs(defs map[string]Builder) *ArrayBuilder
func (*ArrayBuilder) Deprecated ¶
func (b *ArrayBuilder) Deprecated(deprecated bool) *ArrayBuilder
func (*ArrayBuilder) Description ¶
func (b *ArrayBuilder) Description(description string) *ArrayBuilder
func (*ArrayBuilder) Examples ¶
func (b *ArrayBuilder) Examples(vals ...[]any) *ArrayBuilder
func (*ArrayBuilder) Items ¶
func (b *ArrayBuilder) Items(items Builder) *ArrayBuilder
func (*ArrayBuilder) MaxItems ¶
func (b *ArrayBuilder) MaxItems(n int) *ArrayBuilder
func (*ArrayBuilder) MinItems ¶
func (b *ArrayBuilder) MinItems(n int) *ArrayBuilder
func (*ArrayBuilder) OneOf ¶ added in v0.2.0
func (b *ArrayBuilder) OneOf(oneOf ...Builder) *ArrayBuilder
func (*ArrayBuilder) PrefixItems ¶
func (b *ArrayBuilder) PrefixItems(prefixItems ...Builder) *ArrayBuilder
func (*ArrayBuilder) Ref ¶ added in v0.2.0
func (b *ArrayBuilder) Ref(ref string) *ArrayBuilder
func (*ArrayBuilder) Schema ¶
func (b *ArrayBuilder) Schema() *Schema
func (*ArrayBuilder) Title ¶
func (b *ArrayBuilder) Title(title string) *ArrayBuilder
func (*ArrayBuilder) UniqueItems ¶
func (b *ArrayBuilder) UniqueItems(v bool) *ArrayBuilder
type BooleanBuilder ¶
type BooleanBuilder struct {
// contains filtered or unexported fields
}
func Boolean ¶
func Boolean() *BooleanBuilder
func (*BooleanBuilder) AnyOf ¶ added in v0.2.0
func (b *BooleanBuilder) AnyOf(anyOf ...Builder) *BooleanBuilder
func (*BooleanBuilder) Const ¶
func (b *BooleanBuilder) Const(v bool) *BooleanBuilder
func (*BooleanBuilder) Default ¶
func (b *BooleanBuilder) Default(v bool) *BooleanBuilder
func (*BooleanBuilder) Deprecated ¶
func (b *BooleanBuilder) Deprecated(deprecated bool) *BooleanBuilder
func (*BooleanBuilder) Description ¶
func (b *BooleanBuilder) Description(description string) *BooleanBuilder
func (*BooleanBuilder) OneOf ¶ added in v0.2.0
func (b *BooleanBuilder) OneOf(oneOf ...Builder) *BooleanBuilder
func (*BooleanBuilder) Ref ¶ added in v0.2.0
func (b *BooleanBuilder) Ref(ref string) *BooleanBuilder
func (*BooleanBuilder) Schema ¶
func (b *BooleanBuilder) Schema() *Schema
func (*BooleanBuilder) Title ¶
func (b *BooleanBuilder) Title(title string) *BooleanBuilder
type NullBuilder ¶
type NullBuilder struct {
// contains filtered or unexported fields
}
func Null ¶
func Null() *NullBuilder
func (*NullBuilder) AnyOf ¶ added in v0.2.0
func (b *NullBuilder) AnyOf(anyOf ...Builder) *NullBuilder
func (*NullBuilder) Deprecated ¶
func (b *NullBuilder) Deprecated(deprecated bool) *NullBuilder
func (*NullBuilder) Description ¶
func (b *NullBuilder) Description(description string) *NullBuilder
func (*NullBuilder) OneOf ¶ added in v0.2.0
func (b *NullBuilder) OneOf(oneOf ...Builder) *NullBuilder
func (*NullBuilder) Ref ¶ added in v0.2.0
func (b *NullBuilder) Ref(ref string) *NullBuilder
func (*NullBuilder) Schema ¶
func (b *NullBuilder) Schema() *Schema
func (*NullBuilder) Title ¶
func (b *NullBuilder) Title(title string) *NullBuilder
type NumberBuilder ¶
type NumberBuilder struct {
// contains filtered or unexported fields
}
func Number ¶
func Number() *NumberBuilder
func (*NumberBuilder) AnyOf ¶ added in v0.2.0
func (b *NumberBuilder) AnyOf(anyOf ...Builder) *NumberBuilder
func (*NumberBuilder) Const ¶
func (b *NumberBuilder) Const(n json.Number) *NumberBuilder
func (*NumberBuilder) Default ¶
func (b *NumberBuilder) Default(n json.Number) *NumberBuilder
func (*NumberBuilder) Deprecated ¶
func (b *NumberBuilder) Deprecated(deprecated bool) *NumberBuilder
func (*NumberBuilder) Description ¶
func (b *NumberBuilder) Description(description string) *NumberBuilder
func (*NumberBuilder) Enum ¶
func (b *NumberBuilder) Enum(vals ...json.Number) *NumberBuilder
func (*NumberBuilder) Examples ¶
func (b *NumberBuilder) Examples(ns ...json.Number) *NumberBuilder
func (*NumberBuilder) ExclusiveMaximum ¶
func (b *NumberBuilder) ExclusiveMaximum(n json.Number) *NumberBuilder
func (*NumberBuilder) ExclusiveMinimum ¶
func (b *NumberBuilder) ExclusiveMinimum(n json.Number) *NumberBuilder
func (*NumberBuilder) Maximum ¶
func (b *NumberBuilder) Maximum(n json.Number) *NumberBuilder
func (*NumberBuilder) Minimum ¶
func (b *NumberBuilder) Minimum(n json.Number) *NumberBuilder
func (*NumberBuilder) MultipleOf ¶
func (b *NumberBuilder) MultipleOf(n json.Number) *NumberBuilder
func (*NumberBuilder) OneOf ¶ added in v0.2.0
func (b *NumberBuilder) OneOf(oneOf ...Builder) *NumberBuilder
func (*NumberBuilder) Ref ¶ added in v0.2.0
func (b *NumberBuilder) Ref(ref string) *NumberBuilder
func (*NumberBuilder) Schema ¶
func (b *NumberBuilder) Schema() *Schema
func (*NumberBuilder) Title ¶
func (b *NumberBuilder) Title(title string) *NumberBuilder
type ObjectBuilder ¶
type ObjectBuilder struct {
// contains filtered or unexported fields
}
func Object ¶
func Object() *ObjectBuilder
func Record ¶
func Record(m map[string]Builder) *ObjectBuilder
func (*ObjectBuilder) AdditionalProperties ¶
func (b *ObjectBuilder) AdditionalProperties(s Builder) *ObjectBuilder
func (*ObjectBuilder) AnyOf ¶ added in v0.2.0
func (b *ObjectBuilder) AnyOf(anyOf ...Builder) *ObjectBuilder
func (*ObjectBuilder) Default ¶
func (b *ObjectBuilder) Default(v map[string]any) *ObjectBuilder
func (*ObjectBuilder) Defs ¶ added in v0.2.0
func (b *ObjectBuilder) Defs(defs map[string]Builder) *ObjectBuilder
func (*ObjectBuilder) DependentRequired ¶
func (b *ObjectBuilder) DependentRequired(names map[string][]string) *ObjectBuilder
func (*ObjectBuilder) Deprecated ¶
func (b *ObjectBuilder) Deprecated(deprecated bool) *ObjectBuilder
func (*ObjectBuilder) Description ¶
func (b *ObjectBuilder) Description(description string) *ObjectBuilder
func (*ObjectBuilder) Examples ¶
func (b *ObjectBuilder) Examples(vals ...map[string]any) *ObjectBuilder
func (*ObjectBuilder) MaxProperties ¶
func (b *ObjectBuilder) MaxProperties(n int) *ObjectBuilder
func (*ObjectBuilder) MinProperties ¶
func (b *ObjectBuilder) MinProperties(n int) *ObjectBuilder
func (*ObjectBuilder) OneOf ¶ added in v0.2.0
func (b *ObjectBuilder) OneOf(oneOf ...Builder) *ObjectBuilder
func (*ObjectBuilder) Properties ¶
func (b *ObjectBuilder) Properties(m map[string]Builder) *ObjectBuilder
func (*ObjectBuilder) Ref ¶ added in v0.2.0
func (b *ObjectBuilder) Ref(ref string) *ObjectBuilder
func (*ObjectBuilder) Required ¶
func (b *ObjectBuilder) Required(names ...string) *ObjectBuilder
func (*ObjectBuilder) Schema ¶
func (b *ObjectBuilder) Schema() *Schema
func (*ObjectBuilder) Title ¶
func (b *ObjectBuilder) Title(title string) *ObjectBuilder
type Schema ¶
type Schema struct { Never bool `json:"-"` Always bool `json:"-"` Defs map[string]*Schema `json:"$defs,omitempty"` Ref string `json:"$ref,omitempty"` AnyOf []*Schema `json:"anyOf,omitempty"` OneOf []*Schema `json:"oneOf,omitempty"` PrefixItems []*Schema `json:"prefixItems,omitempty"` Items *Schema `json:"items,omitempty"` AdditionalProperties *Schema `json:"additionalProperties,omitempty"` Properties map[string]*Schema `json:"properties,omitempty"` Type string `json:"type"` Const any `json:"const,omitempty"` Enum []any `json:"enum,omitempty"` MultipleOf json.Number `json:"multipleOf,omitempty"` Maximum json.Number `json:"maximum,omitempty"` ExclusiveMaximum json.Number `json:"exclusiveMaximum,omitempty"` Minimum json.Number `json:"minimum,omitempty"` ExclusiveMinimum json.Number `json:"exclusiveMinimum,omitempty"` MaxLength json.Number `json:"maxLength,omitempty"` MinLength json.Number `json:"minLength,omitempty"` Pattern string `json:"pattern,omitempty"` MaxItems json.Number `json:"maxItems,omitempty"` MinItems json.Number `json:"minItems,omitempty"` UniqueItems bool `json:"uniqueItems,omitempty"` MaxProperties json.Number `json:"maxProperties,omitempty"` MinProperties json.Number `json:"minProperties,omitempty"` Required []string `json:"required,omitempty"` DependentRequired map[string][]string `json:"dependentRequired,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Default any `json:"default,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Examples []any `json:"examples,omitempty"` // Environments extensions Secret bool `json:"secret,omitempty"` // contains filtered or unexported fields }
func (*Schema) GetExclusiveMaximum ¶
func (*Schema) GetExclusiveMinimum ¶
func (*Schema) GetMaxItems ¶
func (*Schema) GetMaxLength ¶
func (*Schema) GetMaxProperties ¶
func (*Schema) GetMaximum ¶
func (*Schema) GetMinItems ¶
func (*Schema) GetMinLength ¶
func (*Schema) GetMinProperties ¶
func (*Schema) GetMinimum ¶
func (*Schema) GetMultipleOf ¶
func (*Schema) GetPattern ¶
func (Schema) MarshalJSON ¶
func (*Schema) UnmarshalJSON ¶
type StringBuilder ¶
type StringBuilder struct {
// contains filtered or unexported fields
}
func String ¶
func String() *StringBuilder
func (*StringBuilder) AnyOf ¶ added in v0.2.0
func (b *StringBuilder) AnyOf(anyOf ...Builder) *StringBuilder
func (*StringBuilder) Const ¶
func (b *StringBuilder) Const(n string) *StringBuilder
func (*StringBuilder) Default ¶
func (b *StringBuilder) Default(n string) *StringBuilder
func (*StringBuilder) Deprecated ¶
func (b *StringBuilder) Deprecated(deprecated bool) *StringBuilder
func (*StringBuilder) Description ¶
func (b *StringBuilder) Description(description string) *StringBuilder
func (*StringBuilder) Enum ¶
func (b *StringBuilder) Enum(vals ...string) *StringBuilder
func (*StringBuilder) Examples ¶
func (b *StringBuilder) Examples(ns ...string) *StringBuilder
func (*StringBuilder) MaxLength ¶
func (b *StringBuilder) MaxLength(n int) *StringBuilder
func (*StringBuilder) MinLength ¶
func (b *StringBuilder) MinLength(n int) *StringBuilder
func (*StringBuilder) OneOf ¶ added in v0.2.0
func (b *StringBuilder) OneOf(oneOf ...Builder) *StringBuilder
func (*StringBuilder) Pattern ¶
func (b *StringBuilder) Pattern(pattern string) *StringBuilder
func (*StringBuilder) Ref ¶ added in v0.2.0
func (b *StringBuilder) Ref(ref string) *StringBuilder
func (*StringBuilder) Schema ¶
func (b *StringBuilder) Schema() *Schema
func (*StringBuilder) Title ¶
func (b *StringBuilder) Title(title string) *StringBuilder
Click to show internal directories.
Click to hide internal directories.