-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add settings option to easily rename produced Client
struct
#837
Comments
Usually what I've seen in this situation is something like this: mod foo {
generate_api!(
spec = "foo.json",
interface = Builder,
}l
}
mod bar {
generate_api!(
spec = "bar.json",
interface = Builder,
}l
}
use foo::Client as FooClient;
use bar::Client as BarClient; Would something like that work for you? If not, how would you ideally imagine specifying the client type name? |
I've got a project where I've put the progenitor-generated clients inside of their own crates, and am generating each client inside that crate's So the
I would love if there was something on The solution you gave is definitely very clean, and I ended up at something similar for my situation, but I can't help but feel like this makes sense as something in |
Not unreasonable. Let me think about it and see if I can come up with something we can commit to. |
There does not seem to be an easy way to change the name of the produced struct. I'm developing an application which may interface with multiple openapi servers, and it would be convenient to give
Client
a more descriptive name.The text was updated successfully, but these errors were encountered: