-
-
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] OpenAPIGenerator v7.0.1 and v6.6.0 is unable to generate a child class's constructor that could be constructed successfully with v6.0.1 #16797
Comments
same issue as #15796 |
Hi @dabdirb, thank you for your response! I checked out the issue you mentioned and in your PR checklist it says the PR was included in your 7.0.0 milestone (https://github.com/OpenAPITools/openapi-generator/pulls?q=is%3Amerged+is%3Apr+milestone%3A7.0.0+15827+), but I tested with both v7.0.0 and v7.0.1 and the issue is still happening. Could you provide some insight on what else I could check out for a resolution? |
@JiyangWuUSB i did not create PR to fix this issue. to fix this issue, can you provide a minimized yaml file ? |
Hi @dabdirb, thank you for your response! Regarding the workaround using lombok, how should we include the parameters in our pom file if we are calling the generator via the maven plugin? Also regarding the "minimized yaml file", could you briefly elaborate on what else is needed beside the snippets included in the issue description? P.S: this is what our current pom looks like:
|
If you want someone to fix this issue, we have to reproduce your issue first. <configOptions>
<additionalModelTypeAnnotations></additionalModelTypeAnnotations>
</configOptions> |
Thx @dabdirb , here is the minimized_yaml that can be used to reproduce the issue:
We have been using the maven plugin version with properties set as in the previous comment, version 7.0.1, 7.0.0 and 6.6.0 were all tested and all three versions prompted this error after setting up the repo and running
|
…r missing parent params
Bug Report Checklist
Description
OpenAPIGenerator v7.0.1 and v6.6.0 is unable to generate a child class's constructor that could be constructed successfully with v6.0.1
We were using this .yaml snippet to define a response type:
using v7.0.1 and v6.6.0 generated code as such:
As shown in the code, the pageInfo variable used in the constructor is neither defined nor passed in as a parameter anywhere.
While using v6.0.1 generates the valid code.
openapi-generator version
v7.0.1 and v6.6.0
OpenAPI declaration file content or url
included in description
This is the definition of the parent class for reference:
Generation Details
Steps to reproduce
Set up the repository and simply run
mvn clean install
, such error would be prompted:[ERROR] /Users/tegee/talech/git/microservices/ts_service/target/generated-sources/src/main/java/com/talech/platform/microservicecommons/controller/dto/ListTimesheetsResponse.java:[46,10] error: pageInfo has private access in SuccessPagingResponseV1
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: