View Source JSV.Key (jsv v0.3.0)
Helpers around the different key formats used in the resolver, builder and validator states to index sub schemas, referenced schemas, anchor or meta schemas.
For instance:
- We have a
{"$ref": "http://some-schema/#$defs/order"}
JSON schema. - The builder will build the
$ref
keyword as a key:{:pointer, "http://some-schema/", ["$defs","order"]}
. - The builder, via the resolver, will fetch
http://some-schema/
, store it locally and build validators. Those validators will be stored under the same key ({:pointer, "http://some-schema/", ["$defs","order"]}
) in the root schema. - When the validator will validate the reference, it will fetch that key from the root schema and apply the retrieved validators to the data.
Summary
Functions
Returns an anchor type key.
Returns a dynamic anchor type key.
Returns a pointer type key.
Returns the namespace of the key.
Creates a new key from an external or local reference.
Returns a string representation of the key, in a URL/JSON pointer format, as chardata.
Types
Functions
Returns an anchor type key.
@spec for_dynamic_anchor(ns(), term()) :: dynamic_anchor()
Returns a dynamic anchor type key.
Returns a pointer type key.
Returns the namespace of the key.
Creates a new key from an external or local reference.
@spec to_iodata(t()) :: IO.chardata()
Returns a string representation of the key, in a URL/JSON pointer format, as chardata.