Builds a catalog's validation schema: the self-contained JSON Schema
messages are validated against (the reference's
Catalog.validation_schema).
From the catalog's resolved schemas (references into its own $defs
and peers written inline, references to common types kept):
- the components, functions, own
$defsand theme are assembled, withanyComponent/anyFunctionlisting the entries, and cleaned (A2UICore.Catalog.SchemaCleaner); - each component is flattened: its
allOfmixins (ComponentCommon,Checkable, local$defsmixins) are merged into oneproperties/requiredobject, its own properties winning, inside the canonical envelope (id,component); local mixins nothing references any more leave$defs; - a
$refto a common type without adescriptiontakes the type's description; - the common types the schema references, transitively, are bundled
into
$defsfrom the publishedcommon_types.json(a catalog without functions getsanyFunction: {"not": {}}); - the declared
protocolVersionis written in its bare form, and before v1.0 every function call schema is closed.
Summary
Functions
The validation schema of a catalog.
The names of the common types of every supported protocol version: the references a catalog keeps when it writes its own references inline.
The anyComponent union of names: {"not": {}} when there are
none.
The anyFunction union of names: {"not": {}} when there are none.
The published common types $defs of a protocol version, with
cross-document references made local. Empty for an unsupported
version.
The names of the system functions a protocol version supplies to every
catalog (@index from v1.0 on).
Types
@type input() :: %{ :catalog_id => String.t(), :protocol_version => String.t(), :instructions => String.t() | nil, :declared_protocol_version => String.t() | nil, :defs => map(), :components => map(), :functions => map(), :resolved => map(), :component_order => [String.t()], :function_order => [String.t()], optional(atom()) => term() }
What the build needs from a catalog.
Functions
The validation schema of a catalog.
The names of the common types of every supported protocol version: the references a catalog keeps when it writes its own references inline.
The anyComponent union of names: {"not": {}} when there are
none.
The anyFunction union of names: {"not": {}} when there are none.
The published common types $defs of a protocol version, with
cross-document references made local. Empty for an unsupported
version.
The names of the system functions a protocol version supplies to every
catalog (@index from v1.0 on).