-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
OneOf is currently not handled by OpenAPI code generator #522
Comments
Which field/endpoint is concerned by this ? I don't mind taking the time to improve the API specs, but I need more info :) |
Thank you ! There are 4 field using oneOf : price_per, currency, location_osm_type and source Those field are seen multiple times This lead to 4 incorrect files : PatchedPriceUpdateCurrency.kt Yes, PatchedPriceUpdateCurrency is used in the generated files in every places where currency is used (not just patchedproficeupdate) |
According to this stackoverflow user, empty string should rather be optional : Since null/empty is exactly why we are using oneOfs, this may be the solution. |
Is the oneOf that we can find like this : done to preemptively be compatible with v3.1 ? If not, what is the purpouse when we already have nullable:true on all those fields ? |
In the Django code, these fields indeed have restricted "choices", but can also be null. |
OpenAPITools/openapi-generator#19258 oneOf + null / fixed & available in v7.9.0 |
OneOf is correctly not handled by the generator. He should come for the 3rd version, but is currently on the roadmap : https://openapi-generator.tech/docs/roadmap/#short-term
This is blocking for the different fields using OneOf to describe the possibility of beeing a value or null/empty.
The text was updated successfully, but these errors were encountered: