Skip to main content

generate_models_string

Function generate_models_string 

Source
pub fn generate_models_string(spec_path: &Path) -> Result<String>
Expand description

Generate Rust models from a spec file and return the formatted source.

This entry point takes no config, so two schema names that collapse onto one Rust identifier are an error. Every schema becomes an item, because no operation exists to prune against. Use generate with output-options.type-name-suffix to resolve such a collision by config.