Skip to main content

generate_json_schema

Function generate_json_schema 

Source
pub fn generate_json_schema<T: JsonSchema>() -> Value
Expand description

Generate a standalone JSON Schema document from a type implementing JsonSchema.

This function generates a compact schema without $defs - any referenced types will appear as $ref without definitions. This is suitable for component schemas used for documentation purposes.

For a complete schema with all $defs included, use generate_json_schema_with_defs.