macro_rules! schema_for {
($type:ty) => { ... };
($_:expr) => { ... };
}Expand description
Generates a RootSchema for the given type using default settings.
The type must implement JsonSchema.
The schema version is strictly draft-07.
ยงExample
use cosmwasm_schema::schema_for;
use schemars::JsonSchema;
#[derive(JsonSchema)]
struct MyStruct {
foo: i32,
}
let my_schema = schema_for!(MyStruct);