Skip to main content

schema_of

Function schema_of 

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

The JSON Schema one type emits, under this crate’s own generator settings.

Sub-schemas are referenced rather than inlined, so that a schema names the types it is built from rather than flattening them into anonymous objects.

§Panics

Panics if the generated schema is not JSON, which it is by construction.