Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] rust: group operations into structs #18637

Open
maxnachlinger opened this issue May 11, 2024 · 0 comments · May be fixed by #18636
Open

[REQ] rust: group operations into structs #18637

maxnachlinger opened this issue May 11, 2024 · 0 comments · May be fixed by #18636

Comments

@maxnachlinger
Copy link
Contributor

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.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant