openapi-generator
openapi-generator copied to clipboard
[REQ] rust: group operations into structs
Is your feature request related to a problem? Please describe.
Group operations into meaningful chunks via Rust structs.
Describe the solution you'd like
given a file named: some_api.rs
and operation fn defined as:
pub fn some_operation0(configuration: &configuration::Configuration,) -> Result<models::SomeData0, Error<SomeError>> ...
pub fn some_operation1(configuration: &configuration::Configuration,) -> Result<models::SomeData1, Error<SomeError>> ...
group operations togetrher in a SomeApi struct:
pub struct SomeApi;
impl SomeApi {
pub fn some_operation0(configuration: &configuration::Configuration,) -> Result<models::SomeData0, Error<SomeError>> ...
pub fn some_operation1(configuration: &configuration::Configuration,) -> Result<models::SomeData1, Error<SomeError>> ...
}
Describe alternatives you've considered
Leaving the generator as is.