JSONSchex.Types.Schema (jsonschex v0.11.2)

Copy Markdown View Source

A compiled JSON Schema containing executable rules and reference metadata.

For registered reference targets, raw and local_refs describe the owning resource's JSON Pointer root and cache, not necessarily the selected node. Structural children inherit that reference context during validation. dynamic_anchor retains the selected node's own $dynamicAnchor name, independently of its owning resource.

Summary

Types

t()

@type t() :: %JSONSchex.Types.Schema{
  content_assertion: boolean(),
  defs: map() | nil,
  draft: String.t(),
  dynamic_anchor: String.t() | nil,
  format_assertion: boolean(),
  loader:
    (String.t() ->
       {:ok, map() | boolean()}
       | {:ok,
          %{:document => map() | boolean(), optional(:base_uri) => String.t()}}
       | {:error, term()})
    | nil,
  local_refs: map(),
  raw: map() | boolean() | nil,
  rules: [JSONSchex.Types.Rule.t()],
  source_id: String.t() | nil
}