-
Notifications
You must be signed in to change notification settings - Fork 134
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
Allow custom class names for generated clients and server resources/handlers #314
Comments
Addressed in #719 |
Hi there, Problem statement: We're using Guardrail to generate client code for a large API surface. We'd like to give the generated client a more explicit name than the auto-generated Available options: It looks like currently there are two ways to do this:
This of course will only have an effect if the openapi spec uses
Cons of this approach are related to the fact that we are relying on whatever tags are specified within the openapi definition.
This appears to generate multiple clients:
Cons of this approach are:
Proposal: We're hoping we could introduce a parameter
|
Hey @blast-hardcheese :) Thanks for reviewing my other open issue! I love the 👀 but also would be curious to hear more detailed thoughts. Do you see any issues with implementing this feature? I'd be happy to take a stab at it if it's something that you folks wouldn't be opposed to merging. |
Meetings all morning for me, I didn't mean to leave this as just the 👀. I'm sympathetic to the need here, I wouldn't mind adding this functionality, though probably just going with Additionally, I'm wondering why the last component in I think at least for now, I think this name only makes sense when not using tags as packages and not using Does this match your expectations? |
Currently guardrail uses the last component of the custom package name (as specified using
x-{jvm,scala,java}-package
ortags
) as a prefix for the generated class name. It would be useful to allow people to name the class name something arbitrary.The text was updated successfully, but these errors were encountered: