-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][aspnetcore] optional query parameters with enum types not nullable #17518
Comments
We ran into this issue as well, pretty annoying as we have to revert all the removed question marks manually every time we generate a new client. |
cc @devhl-labs who's the author of the commit 6299af1 |
I'm observing same issue with csharp generator in any 7.X |
The commit introduced a fatal incompatibility in the generated code. Please check out commit 598c27d, the parent of the commit. Build it, and then generate the code for the above YAML using the aspnetcore generator. You will see the code we expect. |
The commit is correct, but it highlights another bug yet to be addressed. I explained exactly what the bug is here |
If I remember correctly, What about using |
Should I also use isEnum? |
isEnumOrRef is true when both using which one really on the use cases. |
thanks for the fix by @devhl-labs which has been merged. please pull the latest master to give it a try |
Bug Report Checklist
Description
The latest aspnetcore generator doesn't set nullable for an optional query parameter in the following definition.
Expected output:
Actual output:
openapi-generator version
From the commit 6299af1 to 7.2.0 and the latest master
Steps to reproduce
Just run the following command. `simple.yml' contains the above declarations.
Suggest a fix
This issue can be fixed by reverting the commit 6299af1.
The text was updated successfully, but these errors were encountered: