[Java][Spring][Issue: 18929] fix missing JsonIgnoreProperties import in oneOf interface file
Fixes #18929
@cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09) @martin-mfg (2023/08)
PR checklist
- [x] Read the contribution guidelines.
- [x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [x] Run the following to build the project and update samples:
(For Windows users, please run the script in Git BASH) Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./mvnw clean package ./bin/generate-samples.sh ./bin/configs/*.yaml ./bin/utils/export_docs_generators.sh./bin/generate-samples.sh bin/configs/java*. IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. - [x] File the PR against the correct branch:
master(upcoming 7.7.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks) - [x] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
Can you generate the samples and include as part of this review?
./bin/generate-samples.sh ./bin/configs/*.yaml
Hi @welshm , I ran the scripts locally before committing and it lead to no changes within the repository. I assume that was the expected outcome?
I will run them again in the evening, to make sure I did not miss anything.
Hi @welshm , I ran the scripts locally before committing and it lead to no changes within the repository. I assume that was the expected outcome?
I will run them again in the evening, to make sure I did not miss anything.
I will have to check if there are any samples that include Jackson. If there are, I would expect changes.
@welshm , I only got to it today. There were some Jackson samples, anyway I added an example for the scenario I was fixing, and (re)generated the sample files. They are part of the second commit.
Change LGTM - approved from wrong account 🤦
@ondrej-simon thanks for the PR.
can you please PM me via Slack to discuss this PR when you've time ?
https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g
Unfortunately some build checks have failed. Seems like I may have uncovered another bug caused by this complicated scenario, which comes to filename generation.
An interface CreateParkAnimalCarerPersonResponsibleForDtoOneOfDto is generated, but it is placed into CreateParkAnimalCarerPersonResponsibleForDtoOneOfDtoDto.java file, there is "DtoDto" in the file name, twice instead of once, hence why build does not work.
Is it possible to get some assistance with this? I do not know what to look for in the project.
An interface CreateParkAnimalCarerPersonResponsibleForDtoOneOfDto is generated, but it is placed into CreateParkAnimalCarerPersonResponsibleForDtoOneOfDtoDto.java file, there is "DtoDto" in the file name, twice instead of once, hence why build does not work.
No idea off the top of my head :(
I would see if the MODEL_NAME_SUFFIX is being set in the test and if so, does changing it impact the file name and then try to trace it from there.
codegen.additionalProperties().put(CodegenConstants.MODEL_NAME_SUFFIX, "Dto");
If I had to guess, it's adding Dto for the when it's generating the model type and then adding Dto again as a model name suffix
Unfortunately some build checks have failed. Seems like I may have uncovered another bug caused by this complicated scenario, which comes to filename generation.
An interface CreateParkAnimalCarerPersonResponsibleForDtoOneOfDto is generated, but it is placed into CreateParkAnimalCarerPersonResponsibleForDtoOneOfDtoDto.java file, there is "DtoDto" in the file name, twice instead of once, hence why build does not work.
Is it possible to get some assistance with this? I do not know what to look for in the project.
Closing this PR - explanation by me in the related issue: https://github.com/OpenAPITools/openapi-generator/issues/18929