API Reference jsv v0.5.1
View SourceModules
This is the main API for the JSV library.
Represents a boolean schema. Boolean schemas accept or reject any data according to their boolean value.
A simple wrapper for errors returned from JSV.build/2
.
Internal logic to build raw schemas into JSV.Root
structs.
JSON encoder/decoder based on available implementation.
Error formatting loosely following the guidelines described at https://json-schema.org/blog/posts/fixing-json-schema-output
Behaviour for format validator implementations.
Default implementation of format validation.
Helper module to read and write to generic Elixir data structures.
Helpers around the different key formats used in the resolver, builder and validator states to index sub schemas, referenced schemas, anchor or meta schemas.
A "namespace" for a schema ID or reference. In the JSV library, a namespace for a schema represents the document the schema belongs to. When it is an URL, it is the scheme, host and path, ignoring the query string and the fragment.
Representation of a JSON Schema reference ($ref
or $dynamicRef
).
Resolves remote resources when building a JSON schema.
A JSV.Resolver
implementation that resolves known schemas shipped as part of
the JSV
library.
A JSV.Resolver
implementation that will fetch the schemas from the web with
the help of the :httpc
module.
A JSV.Resolver
implementation that resolves URIs pointing to the application
code base or JSV code base.
This module allows to build JSV.Resolver
implementations that resolves
schemas based on disk based on their $id
property. It is not itself a
JSV.Resolver
implementation.
Represents a cache entry for a resolved resource.
Internal representation of a JSON schema built with JSV.build/2
.
This module defines a struct where all the supported keywords of the JSON schema specification are defined as keys. Text editors that can predict the struct keys will make autocompletion available when writing schemas.
Utilities to work with structs defined by schemas.
Build result for a raw map schema.
The data structure returned by JSV.validate/3
when validation fails.
This is the home of the recursive validation logic.
Representation of an error encountered during validation.
Validation context carried along by the JSV.Validator
and given to all
vocabulary implementations.
Behaviour for vocabulary implementation.
Implementation for the https://json-schema.org/draft/2020-12/vocab/applicator
vocabulary.
Invactive implementation for the
https://json-schema.org/draft/2020-12/vocab/content
vocabulary. No
validation is performed.
Implementation for the https://json-schema.org/draft/2020-12/vocab/core
vocabulary.
Implementation for the
https://json-schema.org/draft/2020-12/vocab/format-annotation
and
https://json-schema.org/draft/2020-12/vocab/format-assertion
vocabularies.
Implementation for the https://json-schema.org/draft/2020-12/vocab/meta-data
vocabulary.
Implementation for the
https://json-schema.org/draft/2020-12/vocab/unevaluated
vocabulary.
Implementation for the
https://json-schema.org/draft/2020-12/vocab/validation
vocabulary.
Implementation of the applicator vocabulary with draft 7 sepecifiticies.
Implementation of the content vocabulary with draft 7 sepecifiticies. No validation is performed.
Implementation of the core vocabulary with draft 7 sepecifiticies.
Implementation of the format vocabulary with draft 7 sepecifiticies.
Implementation of the meta-data vocabulary with draft 7 sepecifiticies.
Implementation of the validation vocabulary with draft 7 sepecifiticies.