-
-
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] While using java 17 and openapi-generator-maven-plugin with version 7.10.0 there is a compilation error while using allOf #20135
Comments
I am facing the same issue after upgrading to version 7.10.0:
Generated code:
Compile error:
If I change the API to this, it works:
|
thanks for sharing the details. did you upgrade from v7.9.0 or an older version such as v7.8.0? |
I upgraded from version 7.9.0. The 7.9.0 version of the code generator
handled the above type just fine (it generated code that compiled).
…On Tue, Nov 19, 2024, 18:25 William Cheng ***@***.***> wrote:
thanks for sharing the details.
did you upgrade from v7.9.0 or an older version such as v7.8.0?
—
Reply to this email directly, view it on GitHub
<#20135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWQSFDK4WSEQD3S46EJ7LTD2BNYB7AVCNFSM6AAAAABSBY54XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBWGMZDEMZXGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Same issue. Interfaces for Spring Controllers now use the object of the allof-Property instead of the specified. 7.9.0 Works fine, 7.10.0 Uses the wrong object |
I'll look into the issue this week. Please use v7.9.0 for the time being. Thanks again for reporting the issue with the details. |
can one of you please share the full spec? I tried to reproduce the issue based on the partial spec shared above but no luck. |
Strangely, if I remove the description field, for the object, it works. Here is the plugin config:
Here is a stripped down version that has the bug:
|
@paul-kraftlauget thanks. I'll take another look tomorrow. |
@wing328 `openapi: 3.0.3 paths: components:
In this all objects are generated, but `
import de.test.dto.BaseObject; import jakarta.validation.Valid; @generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.10.0")
} ObjebList misses the import for ObjectB `
import de.test.dto.BaseObject; import jakarta.validation.Valid; @generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.10.0")
} The maven snippet with the generator:
` |
Sorry, the formatting didn't work so well. |
Bug Report Checklist
Description
While using java 17 and openapi-generator-maven-plugin with version 7.10.0 there is a compilation error while using allOf.
Example:
and ExampleCreateRequest is next:
the next java code was generated
openapi-generator version
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: