-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Java] "allOf" does not support inheritance #3172
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
Comments
Technically it is not a bug https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#does-openapi-generator-support-all-new-features-in-openapi-specification-v3 A bug is a mistake in an existing feature. Processing of |
@vincent-ch for inheritance, please use |
Thanks for your answer @wing328 , I did a quick test and it looks good. I just have to test how I can configure it with my complexes cases. This is not a bug in this case. |
@vincent-ch glad to hear the issue has been resolved for you. If you like what OpenAPI Generator offers, please consider supporting our voluntary work via https://opencollective.com/openapi_generator |
After I got the Pet model working that @marcdejonge provided in #9615 (comment), I figured out a workaround for my own issue. I had separate yaml files for my schema model classes, and by moving them into the same file as the endpoints under this, it worked for me!!!
|
Description
I just attempted to use allOf in my project to use inheritance in our data model.
openapi-generator version
I am using the Maven plugin: openapi-generator-maven-plugin:4.0.0-beta2
OpenAPI declaration file
Result
Suggest a fix/enhancement
The Java generator should support single inheritance. It would give us way more flexibilty in the usage of the generated classes in our code.
The text was updated successfully, but these errors were encountered: