Documentation
¶
Overview ¶
Package jsonschema validates JSON values against a bounded, offline subset of JSON Schema 2020-12 given as raw JSON. Unsupported assertion keywords fail compilation instead of being ignored. References are local JSON pointers only; compilation never fetches resources. Evaluation is bounded in depth and work, and values and schemas follow the plugin JSON rules (UTF-8, unique keys, no unpaired surrogates, 64 levels, at most plugin.MaxFrameBytes).
This package validates arbitrary caller schemas. Package schema is the small typed vocabulary for plugin payload declarations in package manifests; the two are independent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalid = fmt.Errorf("%w: JSON Schema validation failed", plugin.ErrInvalid)
ErrInvalid is wrapped by every validation failure; it also matches plugin.ErrInvalid.
Functions ¶
func Validate ¶
func Validate(schema, value json.RawMessage) error
Types ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}