Skip to main content

Module json_schema

Module json_schema 

Source
Expand description

Renderer that produces a JSON Schema document from a SchemaGraph/ SchemaType.

Structs§

JsonSchemaConfig
Configuration for the JSON Schema renderer.

Functions§

to_external_input_json_schema
Render a JSON Schema for untrusted external input. Host-managed capability leaves cannot be constructed by callers.
to_external_output_json_schema
Render a JSON Schema for externally visible output. Host-managed capability leaves expose only their redacted placeholders.
to_json_schema
Render (graph, ty) to a canonical JSON Schema document (includes the $schema draft marker). See to_json_schema_with_config for the configurable form.
to_json_schema_with_config
Render (graph, ty) to a JSON Schema document. When ty is a Ref(TypeId) the document is { "$defs": {…}, "$ref": "#/$defs/<id>" }; otherwise the root schema is emitted inline with $defs carrying every named definition from the graph plus any union per-branch synthesised schemas under tag-derived keys (see [BranchNameTable]).
to_reflection_json_schema
Render the JSON domain accepted by reflection pack_json/unpack_json. Capability, future, and stream leaves are unsatisfiable because those adapters have no JSON representation for them.