Expand description
Guest-safe canonical schema and value rendering.
Modules§
- error
- Shared error type for the renderer family.
- json_
schema - Renderer that produces a JSON Schema document from a
SchemaGraph/SchemaType. - json_
value - JSON value renderer: convert a
(SchemaGraph, SchemaType, SchemaValue)to and from aserde_json::Value. - openapi
- Thin OpenAPI 3.1 adaptor over
super::json_schema. - walker
- Dynamic walker skeleton operating over
(SchemaGraph, SchemaType, SchemaValue).
Structs§
- Json
Schema Config - Configuration for the JSON Schema renderer.
Enums§
- Render
Error - Errors produced by the schema/value renderers.
- Walker
Error - Errors raised by the
walkdriver. Walker-specific errors are wrapped inWalkerError::Walker.
Traits§
- Schema
Walker - Driver-friendly walker over a typed value tree.
Functions§
- from_
json_ value - Decode a
serde_json::Valueinto a value tree typed bytyingraph. - from_
untrusted_ json_ value - Decode externally supplied JSON without allowing it to construct host-managed capabilities. Rejection happens when the selected value path reaches a capability leaf, so absent options and unselected sum-type arms remain valid.
- resolve_
ref - Resolve any leading
SchemaType::Refhops onty(cycle-aware) and hand the resulting non-ref body tof. Errors raised by ref handling surface asWalkerError::RefCycle/WalkerError::DanglingRef; the caller’s own error type is wrapped inWalkerError::Walker. - to_
external_ input_ json_ schema - Render a JSON Schema for untrusted external input. Host-managed capability leaves cannot be constructed by callers.
- to_
external_ input_ openapi_ components - Render a schema bundle for untrusted external input.
- to_
external_ output_ json_ schema - Render a JSON Schema for externally visible output. Host-managed capability leaves expose only their redacted placeholders.
- to_
external_ output_ openapi_ components - Render a schema bundle for externally visible output.
- to_
json_ schema - Render
(graph, ty)to a canonical JSON Schema document (includes the$schemadraft marker). Seeto_json_schema_with_configfor the configurable form. - to_
json_ schema_ with_ config - Render
(graph, ty)to a JSON Schema document. Whentyis aRef(TypeId)the document is{ "$defs": {…}, "$ref": "#/$defs/<id>" }; otherwise the root schema is emitted inline with$defscarrying every named definition from the graph plus any union per-branch synthesised schemas under tag-derived keys (see [BranchNameTable]). - to_
json_ value - Render a value tree to a
serde_json::Value. - to_
json_ value_ redacted - Render a value tree to a
serde_json::Value, redacting every host-managed capability node (seeHostManagedKind). - to_
openapi_ components - Render
(graph, ty)to an OpenAPI 3.1 schema bundle. - 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. - walk
- Drive a walker over
(graph, ty, value).