-
Notifications
You must be signed in to change notification settings - Fork 108
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
openapi spec improperly uses allOf when not needed #3563
Comments
this is also an issue for the exporter part:
|
I do believe that the generated schema is correct, and that it cannot be simplified using
|
|
Well maybe, first off all, this is what drf-spectacular generates for us. It may be redundant, yes. But we cannot have "$ref" and "description" without composing it with the help of "allOf". |
@jlsherrill can we close this now that your openapi-generator PR has been merged? |
yes sir! |
Version
3.22.2
Describe the bug
The openapi spec is written in such a way that is valid, but makes generating bindings problematic for some languages.
properties such as:
could be re-written to be:
and thus the property would only have a single type, and can be more easily handled by the openapi-generator, since the type is known and singular
To Reproduce
see this bug: OpenAPITools/openapi-generator#14665
Expected behavior
allOf should not be used in the spec when there is only a single type
Additional context
this prevents go bindings from being generated properly without patching
The text was updated successfully, but these errors were encountered: