-
Notifications
You must be signed in to change notification settings - Fork 273
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
Autogenerated variables can be improved #1117
Comments
hey @gabn88, that didn't take long. 😄 we had this discussion in other issues also. So this is now a external limitation basically and it has been raised several times. OpenAPI 3.0.3 has no way to give an OpenAPI 3.1 does have a construction that allows this. After years of back and forth this was recently decided: OAI/OpenAPI-Specification#681 However, 3.1 integration in #825 is not merged yet and on top of that, the new construction is not implemented yet. |
@tfranzel You are also fast, thank you for the update on #1113! I modified the issue a bit, as I think there are actually two issues.
I thought the second issue is maybe fixable? |
I get the pain on point 2. I had that pain myself, but OpenApi 3.0.3 has no official structure for it and the community/ecosystem was never able to settle on a solution. So all hacks only have limited support and adding a bunch of different hacks here will only lead to (maintainer-)misery. This is as good as it gets for 3.0.3 and it is basically completely out of our/my control. We can implement that new convention OAI/OpenAPI-Specification#681 (comment) after merging 3.1 support, but it looks like the ecosystem has no support for this yet either. |
I see your point. Let's hope we get there some day. Thanks for your patience with answering my questions! |
Describe the bug
The autogenerated variables are incorrect
Now the enums are fixed (#1113), we would like to use the Enums to generate the variables for the choices automatically.
For example:
Becomes
Becomes (typescript generator):
Expected behavior
Keep varnames from the server Enum and use them for the varname in the Enum in the schema
The text was updated successfully, but these errors were encountered: