Versions in this module Expand all Collapse all v4 v4.0.0 Aug 15, 2021 Changes in this version + var Decoders = map[string]func(string) ([]byte, error) + var Draft2019 = &Draft + var Draft4 = &Draft + var Draft6 = &Draft + var Draft7 = &Draft + var Formats = map[string]func(interface{}) bool + var LoadURL = func(s string) (io.ReadCloser, error) + var Loaders = map[string]func(url string) (io.ReadCloser, error) + var MediaTypes = map[string]func([]byte) error + func DecodeJSON(r io.Reader) (interface{}, error) + type Compiler struct + AssertContent bool + AssertFormat bool + Draft *Draft + ExtractAnnotations bool + LoadURL func(s string) (io.ReadCloser, error) + func NewCompiler() *Compiler + func (c *Compiler) AddResource(url string, r io.Reader) error + func (c *Compiler) Compile(url string) (*Schema, error) + func (c *Compiler) MustCompile(url string) *Schema + func (c *Compiler) RegisterExtension(name string, meta *Schema, ext ExtCompiler) + type CompilerContext struct + func (ctx CompilerContext) Compile(v interface{}, vPtr string, applicableOnSameInstance bool) (*Schema, error) + func (ctx CompilerContext) CompileRef(ref string, refPtr string, applicableOnSameInstance bool) (*Schema, error) + type Draft struct + type ExtCompiler interface + Compile func(ctx CompilerContext, m map[string]interface{}) (ExtSchema, error) + type ExtSchema interface + Validate func(ctx ValidationContext, v interface{}) error + type InfiniteLoopError string + func (e InfiniteLoopError) Error() string + type InvalidJSONTypeError string + func (e InvalidJSONTypeError) Error() string + type Schema struct + AdditionalItems interface{} + AdditionalProperties interface{} + AllOf []*Schema + Always *bool + AnyOf []*Schema + Constant []interface{} + Contains *Schema + ContentEncoding string + ContentMediaType string + Default interface{} + Dependencies map[string]interface{} + DependentRequired map[string][]string + DependentSchemas map[string]*Schema + Description string + Else *Schema + Enum []interface{} + Examples []interface{} + ExclusiveMaximum *big.Rat + ExclusiveMinimum *big.Rat + Extensions map[string]ExtSchema + Format string + If *Schema + Items interface{} + MaxContains int + MaxItems int + MaxLength int + MaxProperties int + Maximum *big.Rat + MinContains int + MinItems int + MinLength int + MinProperties int + Minimum *big.Rat + MultipleOf *big.Rat + Not *Schema + OneOf []*Schema + Pattern *regexp.Regexp + PatternProperties map[*regexp.Regexp]*Schema + Properties map[string]*Schema + PropertyNames *Schema + Ptr string + ReadOnly bool + RecursiveAnchor bool + RecursiveRef *Schema + Ref *Schema + RegexProperties bool + Required []string + Then *Schema + Title string + Types []string + URL string + UnevaluatedItems *Schema + UnevaluatedProperties *Schema + UniqueItems bool + WriteOnly bool + func Compile(url string) (*Schema, error) + func CompileString(url, schema string) (*Schema, error) + func MustCompile(url string) *Schema + func MustCompileString(url, schema string) *Schema + func (s *Schema) Validate(r io.Reader) error + func (s *Schema) ValidateInterface(doc interface{}) (err error) + type SchemaError struct + Err error + SchemaURL string + func (se *SchemaError) Error() string + func (se *SchemaError) GoString() string + type SchemeNotRegisteredError string + func (s SchemeNotRegisteredError) Error() string + type ValidationContext struct + func (ValidationContext) Error(schemaPtr string, format string, a ...interface{}) *ValidationError + func (ctx ValidationContext) Validate(s *Schema, v interface{}) error + type ValidationError struct + Causes []*ValidationError + InstancePtr string + Message string + SchemaPtr string + SchemaURL string + func (ValidationError) Group(parent *ValidationError, causes ...error) error + func (ve *ValidationError) Error() string + func (ve *ValidationError) GoString() string + func (ve *ValidationError) MessageFmt() string Other modules containing this package github.com/santhosh-tekuri/jsonschema github.com/santhosh-tekuri/jsonschema/v2 github.com/santhosh-tekuri/jsonschema/v3 github.com/santhosh-tekuri/jsonschema/v5 github.com/santhosh-tekuri/jsonschema/v6