Skip to main content

validate_custom_schema

Function validate_custom_schema 

Source
pub fn validate_custom_schema(schema: &Value) -> Result<(), String>
Expand description

Validate that a schema is a flat object (no nested objects/arrays in properties).

The schema must have "type": "object" and a "properties" map where each property’s type is a scalar (string, integer, number, boolean). Returns Err with a description if the schema is unsuitable.