Skip to content

Conversation

@Jurrie
Copy link

@Jurrie Jurrie commented Nov 21, 2025

This fixes issue #9018

This is basically just copying the relevant things (the "vendorExtensions.x-is-jackson-optional-nullable" things) from modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache to modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache.

Mentioning Java technical committee @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @martin-mfg
PR checklist
  • [✔] Read the contribution guidelines.
  • [✔] 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.
  • [✔] Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    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 ./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.
  • [✔] File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • [✔] If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • [✔] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@Jurrie Jurrie marked this pull request as ready for review November 21, 2025 13:37
@Jurrie Jurrie marked this pull request as draft November 21, 2025 13:54
@Jurrie Jurrie force-pushed the issue/9018_support_JsonNullable_in_jaxrs-spec branch from c90ae9c to 6dcfadd Compare November 21, 2025 14:03
@Jurrie Jurrie marked this pull request as ready for review November 21, 2025 15:09
@Jurrie Jurrie changed the title Support JsonNullable in JaxRS-spec (issue #9018) [Java] Support JsonNullable in JaxRS-spec (issue #9018) Nov 21, 2025
@wing328
Copy link
Member

wing328 commented Nov 23, 2025

thanks for the PR

please follow step 3 to update the samples.

@Jurrie
Copy link
Author

Jurrie commented Nov 24, 2025

Hi @wing328, sorry for missing this. The changes were in all sort of files I did not expect, so I assumed that these were not part of the PR. Now I see that they should've been included. The changes are present because the flag openApiNullable (default true) is now honored in modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache (the same way as in modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache), causing a new import statement.

@Jurrie
Copy link
Author

Jurrie commented Nov 24, 2025

After running bin/utils/ensure-up-to-date I get the following untracked files:

	modules/openapi-generator-cli/.checkstyle
	modules/openapi-generator-core/.checkstyle
	modules/openapi-generator-core/src/main/java/META-INF/
	modules/openapi-generator-maven-plugin/.checkstyle
	modules/openapi-generator-online/.checkstyle
	modules/openapi-generator-online/src/main/java/META-INF/
	modules/openapi-generator/.checkstyle
	modules/openapi-generator/src/main/java/META-INF/
	samples/server/petstore/springboot-beanvalidation/src/main/java/META-INF/
	samples/server/petstore/springboot-reactive/src/main/java/META-INF/
	samples/server/petstore/springboot-virtualan/src/main/java/META-INF/
	samples/server/petstore/springboot/src/main/java/META-INF/

These are most likely not related to my changes. At least, I don't recognize them as such. Should I commit those files?

@wing328
Copy link
Member

wing328 commented Nov 24, 2025

are you using WSL under Windows to run the command updating samples?

@Jurrie
Copy link
Author

Jurrie commented Nov 24, 2025

No, I'm using Ubuntu LTS.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.3 LTS
Release:	24.04
Codename:	noble
$ java -version
openjdk version "11.0.23" 2024-04-16
OpenJDK Runtime Environment Temurin-11.0.23+9 (build 11.0.23+9)
OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (build 11.0.23+9, mixed mode)
$ mvn --version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /home/jurrie/java/apache-maven-3.9.6
Java version: 11.0.23, vendor: Eclipse Adoptium, runtime: /home/jurrie/.sdkman/candidates/java/11.0.23-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.14.0-35-generic", arch: "amd64", family: "unix"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants