-
-
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] REF_AS_PARENT_IN_ALLOF=true no longer works for allOf combined with properties #16389
Comments
can you please try enabling |
Yes, with But in that case I notice additional unused *AllOf.java classes being generated. Can that be avoided? |
can you try the latest master as well? snapshot version can be found in the project's readme. |
openapi-generator-cli-7.0.0-20230824.100806-306 behaves same as 7.0.0-beta in this regard. To clarify: the behavior of 7.0.0 not generating these *AllOf.java that are not used anyway seems fine to me, |
Nope. You can delete those files manually post code generation. v7.0.0 has been released. Please consider using the latest stable version instead. |
Just a note that I am experiencing this bug in 7.7.0. For context, I am generating kotlin classes, maybe that has an impact.
I get a |
@mikepictor did you enable the rule in the normalizer? |
Bug Report Checklist
Description
For test.yaml openapi example below, I expect the generated code to use inheritance for all 3 cases.
But, from 6.5.0 onwards, Y no longer extends B in the generated code.
Y is combination of an allOf and object properties.
When the object properties are embedded inside the allOf (example X) it works.
Or when adding x-parent: true (example Z) it also works.
openapi-generator version
Works in 6.4.0, fails in 6.5.0, 6.6.0 and 7.0.0-beta
OpenAPI declaration file content or url
test.yaml:
Steps to reproduce
The text was updated successfully, but these errors were encountered: