Versions in this module Expand all Collapse all v1 v1.1.0 Nov 26, 2025 Changes in this version + var FalseSchema = &Schema + var TrueSchema = &Schema + var Version = "https://json-schema.org/draft/2020-12/schema" + func ToSnakeCase(str string) string + type CommentOption func(*commentOptions) + func WithFullComment() CommentOption + type Definitions map[string]*Schema + type ID string + const DefaultBaseSchemaID + const EmptyID + func (id ID) Add(path string) ID + func (id ID) Anchor(name string) ID + func (id ID) Base() ID + func (id ID) Def(name string) ID + func (id ID) String() string + func (id ID) Validate() error + type Properties struct + func NewProperties() *Properties + func NewPropertiesCap(capacity int) *Properties + func (p *Properties) Delete(key string) + func (p *Properties) Get(key string) (*Schema, bool) + func (p *Properties) Len() int + func (p *Properties) MarshalJSON() ([]byte, error) + func (p *Properties) Set(key string, value *Schema) + func (p *Properties) UnmarshalJSON(data []byte) error + type Reflector struct + AdditionalFields func(reflect.Type) []reflect.StructField + AllowAdditionalProperties bool + Anonymous bool + AssignAnchor bool + BaseSchemaID ID + CommentMap map[string]string + DoNotReference bool + ExpandedStruct bool + FieldNameTag string + IgnoredTypes []any + KeyNamer func(string) string + Lookup func(reflect.Type) ID + LookupComment func(reflect.Type, string) string + Mapper func(reflect.Type) *Schema + Namer func(reflect.Type) string + RequiredFromJSONSchemaTags bool + SchemaModifier SchemaModifierFn + func (r *Reflector) AddGoComments(base, path string, opts ...CommentOption) error + func (r *Reflector) Reflect(v any) *Schema + func (r *Reflector) ReflectFromType(t reflect.Type) *Schema + func (r *Reflector) SetBaseSchemaID(id string) + type Schema struct + AdditionalProperties *Schema + AllOf []*Schema + Anchor string + AnyOf []*Schema + Comments string + Const any + Contains *Schema + ContentEncoding string + ContentMediaType string + ContentSchema *Schema + Default any + Definitions Definitions + DependentRequired map[string][]string + DependentSchemas map[string]*Schema + Deprecated bool + Description string + DynamicRef string + Else *Schema + Enum []any + Examples []any + ExclusiveMaximum jsonv1.Number + ExclusiveMinimum jsonv1.Number + Extras map[string]any + Format string + ID ID + If *Schema + Items *Schema + MaxContains *uint64 + MaxItems *uint64 + MaxLength *uint64 + MaxProperties *uint64 + Maximum jsonv1.Number + MinContains *uint64 + MinItems *uint64 + MinLength *uint64 + MinProperties *uint64 + Minimum jsonv1.Number + MultipleOf jsonv1.Number + Not *Schema + OneOf []*Schema + Pattern string + PatternProperties map[string]*Schema + PrefixItems []*Schema + Properties *Properties + PropertyNames *Schema + ReadOnly bool + Ref string + Required []string + Then *Schema + Title string + Type string + TypeEnhanced []string + UniqueItems bool + Version string + WriteOnly bool + func Reflect(v any) *Schema + func ReflectFromType(t reflect.Type) *Schema + func (t *Schema) MarshalJSON() ([]byte, error) + func (t *Schema) UnmarshalJSON(data []byte) error + type SchemaModifierFn func(jsonTagName string, t reflect.Type, tag reflect.StructTag, schema *Schema)