Versions in this module Expand all Collapse all v0 deprecated v0.0.19 Aug 10, 2026 Changes in this version + var BoolKeyword = Keyword + var ErrInvalidSchema = errors.New("invalid schema") + var SchemaKeyword = Keyword + func AddError(perr *error, err error, loc string) + func AddValidationErrorStruct(perr *error, ve *ValidationError) + func ClearVocabularies() + func EnsureInstanceLocation(err error, ptr string) error + func IsValidationError(err error) bool + func NewValidateError(err error, errs []*ValidationError) error + func RegisterVocabulary(v *Vocabulary, def bool) + func SetDefaultSchema(s string) error + func SetLoader(fn func(schemaID string, uri *url.URL) (*Schema, error)) func(string, *url.URL) (*Schema, error) + type ArgType int + const ArgTypeAny + const ArgTypeBool + const ArgTypeFloat + const ArgTypeInt + const ArgTypeMapArrayOrSchema + const ArgTypeMapSchema + const ArgTypeSchema + const ArgTypeSchemaOrSchemas + const ArgTypeSchemas + const ArgTypeString + const ArgTypeStringOrStrings + const ArgTypeStrings + type ArrayOrSchema struct + Array []string + Schema *Schema + type Keyword struct + ArgType ArgType + Generated bool + Name string + Validate func(arg PartValue, instance any, state *ValidationState) error + func (k1 Keyword) Equal(k2 Keyword) bool + type Part struct + Keyword *Keyword + Value PartValue + func MakePart(keyword *Keyword, value PartValue) Part + type PartAny struct + V any + type PartBool bool + type PartFloat float64 + type PartInt int64 + type PartMapArrayOrSchema map[string]ArrayOrSchema + type PartMapSchema map[string]*Schema + type PartSchema struct + S *Schema + type PartSchemaOrSchemas struct + Schema *Schema + Schemas []*Schema + type PartSchemas []*Schema + type PartString string + type PartStringOrStrings struct + String string + Strings []string + type PartStrings []string + type PartValue interface + type ResolveOpts struct + Loader func(schemaID string, uri *url.URL) (*Schema, error) + URI *url.URL + Vocabulary *Vocabulary + type Schema struct + Parts []Part + func SchemaFromJSON(schemaID string, uri *url.URL, v any) (*Schema, error) + func (s *Schema) Children() iter.Seq2[string, *Schema] + func (s *Schema) Clone() *Schema + func (s *Schema) Finalize(v *Vocabulary) + func (s *Schema) LookupKeyword(keyword string) (PartValue, bool) + func (s *Schema) MarshalJSON() ([]byte, error) + func (s *Schema) MarshalJSONTo(enc *jsontext.Encoder) error + func (s *Schema) Resolve(opts *ResolveOpts) error + func (s *Schema) String() string + func (s *Schema) UnmarshalJSON(data []byte) error + func (s *Schema) UnmarshalJSONFrom(dec *jsontext.Decoder) error + func (s *Schema) Validate(instance any) error + func (s *Schema) ValidateInPlaceSchema(instance any, state *ValidationState) error + func (s *Schema) ValidateSubSchema(instance any, state *ValidationState) error + func (s *Schema) ValidateWithOpts(instance any, opts *ValidateOpts) error + type ValidateError struct + Errors []*ValidationError + func (ve *ValidateError) Is(target error) bool + func (ve *ValidateError) Unwrap() error + type ValidateOpts struct + ApplyDefaults bool + ValidateFormat bool + type ValidationError struct + InstanceLocation string + KeywordLocation string + Message string + func (ve *ValidationError) Error() string + type ValidationErrors struct + Errs []*ValidationError + func (ves *ValidationErrors) Error() string + type ValidationState struct + Depth int + Index int + InstancePath []string + Notes notes.Notes + Opts *ValidateOpts + Root *Schema + RootState *ValidationState + Schema *Schema + URI *url.URL + VersionData *any + func (vs *ValidationState) Child() (*ValidationState, error) + func (vs *ValidationState) InstancePointer() string + func (vs *ValidationState) PopInstanceToken() + func (vs *ValidationState) PushInstanceToken(tok string) + type Vocabulary struct + Cmp func(string, string) int + Keywords map[string]*Keyword + Name string + Resolve func(*Schema, *ResolveOpts) error + Schema string + func DefaultVocabulary() *Vocabulary + func LookupVocabulary(s string) *Vocabulary