Skip to main content

cli_schema_for

Function cli_schema_for 

Source
pub fn cli_schema_for<T>() -> Value
where T: JsonSchema,
Expand description

Generate a JSON Schema for a type at runtime using schemars.

Called by --output-schema in #[cli]-generated code when the jsonschema feature is enabled. Users must #[derive(schemars::JsonSchema)] on their return types to use this.