Versions in this module Expand all Collapse all v0 v0.1.0 Jul 25, 2026 Changes in this version + func ApplyDefaults(targetPtr any) error + func ApplyDefaultsWithPresence(targetPtr any, presence map[string]json.RawMessage) error + func Bind[T any](raw []byte, target *T, walker *Walker) error + func WithRegistry(ctx context.Context, r *Registry) context.Context + type AnyTyped interface + DerivedKeys func() []string + JSONSchema func() map[string]any + SchemaDescription func() string + SchemaFields func() map[string]FieldMeta + SchemaKey func() string + SchemaTiers func() []Tier + SchemaTitle func() string + type Constraint struct + Else ConstraintExpr + If ConstraintExpr + RawJSONSchema json.RawMessage + Then ConstraintExpr + type ConstraintExpr struct + Field string + Inner []ConstraintExpr + Kind ConstraintKind + Value any + func AllOf(inner ...ConstraintExpr) ConstraintExpr + func AnyOf(inner ...ConstraintExpr) ConstraintExpr + func FieldEmpty(field string) ConstraintExpr + func FieldEquals(field string, value any) ConstraintExpr + func FieldPresent(field string) ConstraintExpr + func FieldRequired(field string) ConstraintExpr + type ConstraintKind string + const KindAllOf + const KindAnyOf + const KindEmpty + const KindEquals + const KindPresent + const KindRequired + const KindZero + type Discriminator struct + Mapping map[string]string + PropertyName string + type EnumOption struct + Title string + Value string + type FieldError struct + Fields []ValidationError + func NewFieldError(location, message string) *FieldError + func NewFieldErrors(fields ...ValidationError) *FieldError + func (e *FieldError) Error() string + type FieldMeta struct + Description string + Enum []EnumOption + Extensions map[string]any + Format string + Help string + Hidden bool + Locked bool + ReadOnly bool + Regimes []string + Title string + WriteOnce bool + type ParseFunc func(raw string) (any, error) + type Provider interface + NewWalker func(t reflect.Type) *Walker + type ReflectValidator struct + func NewReflectValidator[T any](src Provider) *ReflectValidator[T] + func (v *ReflectValidator[T]) Validate(req T) []ValidationError + type Registry struct + func NewRegistry() *Registry + func RegistryFromContext(ctx context.Context) *Registry + func (r *Registry) Lookup(t reflect.Type) *TypeSchema + func (r *Registry) MustRegister(t reflect.Type, ts *TypeSchema) *Registry + func (r *Registry) NewWalker(t reflect.Type) *Walker + func (r *Registry) Register(t reflect.Type, ts *TypeSchema) error + func (r *Registry) Require(types ...reflect.Type) error + type Schema struct + AdditionalProperties *Schema + AllOf []*Schema + AnyOf []*Schema + DecimalPlaces *int + Default any + Deprecated bool + Description string + Discriminator *Discriminator + Enum []any + Example any + ExclusiveMaximum *float64 + ExclusiveMinimum *float64 + Extensions map[string]any + Format string + Items *Schema + MaxItems *int + MaxLength *int + MaxProperties *int + Maximum *float64 + MinItems *int + MinLength *int + MinProperties *int + Minimum *float64 + MultipleOf *float64 + Not *Schema + Nullable bool + OneOf []*Schema + Pattern string + Properties map[string]*Schema + ReadOnly bool + Ref string + Required []string + Title string + Type string + WriteOnly bool + func Reflect(t reflect.Type, types *Registry) *Schema + func (s *Schema) IsRef() bool + func (s Schema) MarshalJSON() ([]byte, error) + type Tier string + const TierCompany + const TierDefault + const TierOrg + const TierUserGlobal + const TierUserInOrg + type TypeSchema struct + Description string + Example any + Format string + MaxLength *int + MinLength *int + Parse ParseFunc + Pattern string + Properties map[string]*Schema + Required []string + Type string + Validate ValidateFunc + func (ts *TypeSchema) ToSchema() *Schema + type Typed struct + Constraints []Constraint + Description string + DiscriminatorField string + Fields map[string]FieldMeta + Key string + Tiers []Tier + Title string + Variants []Variant + func (t Typed[T]) AsAny() AnyTyped + func (t Typed[T]) DerivedKeys() []string + func (t Typed[T]) JSONSchema() map[string]any + func (t Typed[T]) SchemaDescription() string + func (t Typed[T]) SchemaFields() map[string]FieldMeta + func (t Typed[T]) SchemaKey() string + func (t Typed[T]) SchemaTiers() []Tier + func (t Typed[T]) SchemaTitle() string + type ValidateFunc func(schema *Schema, val reflect.Value, path string, errors *[]ValidationError) + type ValidationError struct + Location string + Message string + Value any + func Field(location, message string) ValidationError + func (e ValidationError) Error() string + type Validator interface + Validate func(req T) []ValidationError + type Variant struct + Schema AnyTyped + Tag string + Title string + type Walker struct + func NewWalker(s *Schema, types *Registry) *Walker + func WalkerFromType(t reflect.Type, types *Registry) *Walker + func (v *Walker) Validate(value any, path string) []ValidationError + func (v *Walker) ValidateWithPresence(value any, path string, presence map[string]json.RawMessage) []ValidationError