Sycophant.Schema.JsonSchema
(sycophant v0.4.2)
Copy Markdown
Converts Zoi schemas to JSON Schema maps.
Wraps Zoi.to_json_schema/1 with normalization: atom keys and values
are converted to strings, and the $schema meta-reference is stripped.
Wire protocol adapters use this for tool parameters and response schemas.
Summary
Functions
Converts a Zoi schema to a normalized JSON Schema map.
Functions
@spec to_json_schema(Zoi.schema() | map()) :: {:ok, map()} | {:error, Splode.Error.t()}
Converts a Zoi schema to a normalized JSON Schema map.