-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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] [JAVA] allOf object are not correctly generated with properties REF_AS_PARENT_IN_ALLOF=true and REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true #20005
Comments
thanks for reporting the issue. i will try to take a look over the weekend |
UPDATE: I've filed #20083 to fix the issue |
This issue is still present in 7.10.0. The latest version it works is 7.1.0. Please check again. Meanwhile 7.1.0 has another issue which creates conflicting setters when using the normalizer flags, so major version 7 is unusable for such examples at the moment. |
@AlexanderEvstatiev can you please share your spec (minimal) to reproduce the issue? @JelmerBouma1985 does the fix (in v7.10.0) work for you? |
@wing328 yes, v7.10.0 works like a charm 👍 |
@wing328
And are being referenced in the task-api.yaml like this:
The last confirmed working version for these schemas was 4.3.1 if that helps. java -jar openapi-generator-cli-7.10.0.jar generate --input-spec task-api.yaml --generator-name spring --output dma --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true,REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true --additional-properties=containerDefaultToNull=true,useJakartaEe=true,skipDefaultInterface=true,hideGenerationTimestamp=true --artifact-id dma --api-package test --model-name-prefix Api --model-package test.model.api --type-mappings=URI=String --type-mappings=AnyType=Object --schema-mappings=... |
Bug Report Checklist
Description
Since release of 7.9.0 allOf objects don´t extend the parent anymore when normalizer REF_AS_PARENT_IN_ALLOF=true and REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true are used.
I expect the child object extends the parent object which works as expected until 7.9.0. Below generated code from 7.8.0:
below code is generated code from 7.9.0
openapi-generator version
7.9.0
OpenAPI declaration file content or url
test.yaml
Generation Details
I'm using the openapi-generator-maven-plugin
Steps to reproduce
java -jar openapi-generator-cli.jar generate -g spring -i test.yaml -o output/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true,REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true
The text was updated successfully, but these errors were encountered: