[java] fixed pojo template for nullable fields#12630
Merged
wing328 merged 3 commits intoOpenAPITools:masterfrom Jul 23, 2022
Merged
[java] fixed pojo template for nullable fields#12630wing328 merged 3 commits intoOpenAPITools:masterfrom
wing328 merged 3 commits intoOpenAPITools:masterfrom
Conversation
6 tasks
Member
|
can you please update the samples so that the CI can verify the result? |
e608577 to
fb7fcd4
Compare
Contributor
Author
|
@wing328 I tried, but both the following commands are failing: ./mvnw clean package I checked, and I'm using Java 1.8... Do you have some suggestions about how to make it work properly? |
Member
|
@valmoz what error did you get? |
Contributor
Author
|
@wing328 I was able to run it. It seems that my maven kept using the wrong version of Java. |
Contributor
Author
|
up 🙏 |
melloware
approved these changes
Jul 13, 2022
|
Waiting the merge, I built a docker image with this PR: it works very well! Thank you @valmoz |
|
up 🙏 |
Member
|
@valmoz thanks for the PR, which has been merged. |
5 tasks
nikosmoum
added a commit
to candlepin/candlepin
that referenced
this pull request
Feb 22, 2023
- Remove the client generator pojo.mustache override file since the bug we worked around has been fixed in 6.3.0. (OpenAPITools/openapi-generator#12630) - Remove the server generator pojo.mustache override file since the bug we worked around has been fixed in 6.3.0. (OpenAPITools/openapi-generator#13076) - Merge in some upstream changes for the server generator api.mustache override file that were added in 6.3.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #12549 this PR modifies the template to be able to manage also JSON fields explicitly set to null (not only omitted field case).
It uses Gson's "isJsonNull" method to check this case, instead of only checking if the key isn't present.
PR checklist
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
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(6.0.1) (patch release),6.1.x(breaking changes with fallbacks),7.0.x(breaking changes without fallbacks)