update deprecated org.springframework.lang.Nullable for Spring Boot 4#23316
update deprecated org.springframework.lang.Nullable for Spring Boot 4#23316raichuchuchu wants to merge 3 commits intoOpenAPITools:masterfrom
Conversation
files. fix: update sample `restclient-enum-in-multipart`
Spring Boot 4 - Update import mapping for Nullable to org.jspecify.annotations.Nullable when useSpringBoot4 is enabled.
Spring Boot 4 - update sample
|
@raichuchuchu there is already #23256 to generate jspecify nullable annotations. Can you review it? |
|
Hello, After submitting this draft, I happened to be reviewing #23256. I fully agree with the transition to org.jspecify.annotations.Nullable via useJspecify to replace the deprecated org.springframework.lang.Nullable. That said, I’ve noticed some edge cases with the JSpecify annotations, so I am also considering whether jakarta.annotation.Nullable might be a viable alternative. I plan to wait until #23256 is merged before further updating my draft. In the meantime, I’d like to take some time to test the changes from #23256 within a real Spring Boot 4 project. |
|
@raichuchuchu if you want to use jakarta nullable, just configure it. For example in the maven plugin So no need for an extra config. Maybe better documentation is enough |
PR checklist
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.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)Summary by cubic
Switches Spring generators to use
org.jspecify.annotations.Nullablewhen targeting Spring Boot 4, replacing deprecatedorg.springframework.lang.Nullable. Also fixesCppHttplibServertest package names and refreshes Java client samples.New Features
SpringCodegen:Nullablenow resolves toorg.jspecify.annotations.NullablewhenuseSpringBoot4is enabled; otherwise it remainsorg.springframework.lang.Nullable.Bug Fixes
cpphttplibservertests.restclient-enum-in-multipartJava client samples to match current generator output.Written for commit 68fc0c9. Summary will update on new commits.