CatalogValidator
class CatalogValidator
Checks components and function calls against the catalogs a renderer holds.
The two checks are the same SchemaEvaluator applied at two places, which is why they live together: a component's properties and a call's arguments are both described by JSON Schema in the same catalog, and both reach the same common_types.json definitions on the way.
A validator is built once per set of catalogs and is safe to keep: it re-encodes each catalog to the document form $ref resolution needs, and doing that per message would re-serialize every definition on every component.
Functions
Link copied to clipboard
The catalog a component or call belongs to.
Link copied to clipboard
fun validateMessage(message: JsonElement, direction: MessageDirection = MessageDirection.AGENT_TO_RENDERER, catalogId: String?): SchemaValidation
Whether a whole message, still in its wire form, matches the schema for its direction.