schema

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONSchemaRawValidator

type JSONSchemaRawValidator struct{}

JSONSchemaRawValidator is entity that has ability to validate data against JSON schema passed as string

func NewJSONSchemaRawValidator

func NewJSONSchemaRawValidator() JSONSchemaRawValidator

func (JSONSchemaRawValidator) Validate

func (J JSONSchemaRawValidator) Validate(document, jsonSchema string) error

Validate validates document against jsonSchema

type JSONSchemaReferenceValidator

type JSONSchemaReferenceValidator struct {
	// contains filtered or unexported fields
}

JSONSchemaReferenceValidator is entity that has ability to validate data against JSON schema passed as reference.

func NewDefaultJSONSchemaReferenceValidator

func NewDefaultJSONSchemaReferenceValidator(schemasDir string) JSONSchemaReferenceValidator

func NewJSONSchemaReferenceValidator

func NewJSONSchemaReferenceValidator(schemasDir string, fileValidator v.Validator, urlValidator v.Validator) JSONSchemaReferenceValidator

func (JSONSchemaReferenceValidator) Validate

func (jsv JSONSchemaReferenceValidator) Validate(document, schemaPath string) error

Validate validates document against JSON schema located in schemaPath. schemaPath may be URL or relative/full path to json schema on user OS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL