Documentation
¶
Index ¶
- func Generate(ctx context.Context, rootType reflect.Type) ([]byte, error)
- type Builder
- type Describer
- type Node
- func AnyOf(nodes ...*Node) *Node
- func BooleanNode() *Node
- func DiscriminatedUnion(builder Builder, discriminatorKey string, discriminatorRequired bool, ...) (*Node, error)
- func DurationNode() *Node
- func IntegerNode() *Node
- func ListableOf(element *Node) *Node
- func LooseObject() *Node
- func OneOf(nodes ...*Node) *Node
- func RefNode(name string) *Node
- func StrictObject() *Node
- func StringConst(value string) *Node
- func StringEnum(values ...string) *Node
- func StringNode() *Node
- func TagReferenceNode(kind string) *Node
- func UnsignedNode(bits int) *Node
- type UnionVariant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct {
SchemaURI string `json:"$schema,omitempty"`
ID string `json:"$id,omitempty"`
Ref string `json:"$ref,omitempty"`
Type any `json:"type,omitempty"`
Const any `json:"const,omitempty"`
Enum []any `json:"enum,omitempty"`
Pattern string `json:"pattern,omitempty"`
Minimum *int64 `json:"minimum,omitempty"`
Maximum *uint64 `json:"maximum,omitempty"`
Items *Node `json:"items,omitempty"`
Properties *badjson.TypedMap[string, *Node] `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
PropertyNames *Node `json:"propertyNames,omitempty"`
AdditionalProperties any `json:"additionalProperties,omitempty"`
UnevaluatedProperties any `json:"unevaluatedProperties,omitempty"`
AllOf []*Node `json:"allOf,omitempty"`
AnyOf []*Node `json:"anyOf,omitempty"`
OneOf []*Node `json:"oneOf,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
Examples []any `json:"examples,omitempty"`
TagReference string `json:"x-tag-reference,omitempty"`
Defs *badjson.TypedMap[string, *Node] `json:"$defs,omitempty"`
}
func BooleanNode ¶
func BooleanNode() *Node
func DiscriminatedUnion ¶
func DurationNode ¶
func DurationNode() *Node
func IntegerNode ¶
func IntegerNode() *Node
func ListableOf ¶
func LooseObject ¶
func LooseObject() *Node
func StrictObject ¶
func StrictObject() *Node
func StringConst ¶
func StringEnum ¶
func StringNode ¶
func StringNode() *Node
func TagReferenceNode ¶
func UnsignedNode ¶
Click to show internal directories.
Click to hide internal directories.