JSONSchex.Draft202012.Vocabulary (jsonschex v0.7.0)

Copy Markdown View Source

Maps JSON Schema keywords to their Draft 2020-12 vocabulary URIs and defines both the full supported vocabulary set and the built-in Draft 2020-12 default active vocabulary set.

Used by JSONSchex.Compiler to check whether a keyword is allowed based on the active vocabulary set, and to resolve $vocabulary declarations.

Examples

iex> JSONSchex.Draft202012.Vocabulary.keyword("type")
"https://json-schema.org/draft/2020-12/vocab/validation"

iex> JSONSchex.Draft202012.Vocabulary.keyword("properties")
"https://json-schema.org/draft/2020-12/vocab/applicator"

iex> JSONSchex.Draft202012.Vocabulary.keyword("unknown")
nil

Summary

Functions

Returns the full list of vocabularies supported by JSONSchex.

Returns the built-in default active vocabularies for the standard Draft 2020-12 dialect.

Returns the format-annotation vocabulary URI.

Returns the format-assertion vocabulary URI.

Returns the vocabulary URI for a given JSON Schema keyword, or nil if unknown.

Functions

defaults()

@spec defaults() :: list()

Returns the full list of vocabularies supported by JSONSchex.

This is the implementation capability set used when validating required $vocabulary declarations.

draft2020_12_defaults()

@spec draft2020_12_defaults() :: list()

Returns the built-in default active vocabularies for the standard Draft 2020-12 dialect.

This excludes format-assertion, which is not enabled by default for the standard Draft 2020-12 dialect.

format_annotation()

Returns the format-annotation vocabulary URI.

format_assertion()

Returns the format-assertion vocabulary URI.

keyword(arg1)

Returns the vocabulary URI for a given JSON Schema keyword, or nil if unknown.