Documentation ¶
Index ¶
- func Compile(sr *SchemaWithReferences) (*gojsonschema.Schema, error)
- func MapError(result *gojsonschema.Result) error
- func Validate(schema *SchemaWithReferences, data interface{}) (*gojsonschema.Result, error)
- func ValidateJSON(schema *SchemaWithReferences, document []byte) error
- type Schema
- type SchemaWithReferences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
func Compile(sr *SchemaWithReferences) (*gojsonschema.Schema, error)
Compile caches JSON schema compilation
func MapError ¶
func MapError(result *gojsonschema.Result) error
func Validate ¶
func Validate(schema *SchemaWithReferences, data interface{}) (*gojsonschema.Result, error)
func ValidateJSON ¶
func ValidateJSON(schema *SchemaWithReferences, document []byte) error
Utility functions
Types ¶
type SchemaWithReferences ¶
SchemaWithReferences -
func ResolveSchemaLocation ¶
func ResolveSchemaLocation(location string, cfg *SchemaWithReferences) *SchemaWithReferences
func ResolveSchemaLocationRoot ¶
func ResolveSchemaLocationRoot(root string, cfg *SchemaWithReferences) *SchemaWithReferences
ResolveSchemaLocationRoot resolved the LocationRoot of the Main and all References schemas
func (SchemaWithReferences) GetReferencesFullPaths ¶
func (s SchemaWithReferences) GetReferencesFullPaths() []string
func (SchemaWithReferences) IsEmpty ¶
func (s SchemaWithReferences) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.