pub fn format_schema(
schema: &Value,
style: SchemaStyle,
max_depth: Option<usize>,
) -> Result<FormatOutput, FormatError>Expand description
Render a JSON Schema for a specific surface.
Returns Err(FormatError::SchemaNotObject) when the schema’s top-level
"type" field is explicitly set to a non-"object" value (e.g. "array",
"string"). Schemas with no "type" field are accepted and rendered
as-is (they may be anyOf/allOf schemas or bare $ref schemas).
See Contract: format_schema in
apcore-toolkit/docs/features/formatting.md.