[−][src]Macro schemars::schema_for
Generates a Schema
for the given type using default settings.
The type must implement JsonSchema
.
Example
use schemars::{schema_for, JsonSchema}; #[derive(JsonSchema)] struct MyStruct { foo: i32, } let my_schema = schema_for!(MyStruct);