Skip to main content

condensed_schema_hint

Function condensed_schema_hint 

Source
pub fn condensed_schema_hint(schema: &Value) -> Option<Value>
Expand description

Extract a condensed representation of a JSON Schema for error hints.

Returns a JSON object with:

  • required: array of required field names
  • properties: object mapping field name -> its declared type (or "any" if absent) with enum choices and numeric bounds included when present

This is intentionally compact so it can be included in validation error payloads without bloating the context.