Skip to content
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

Bump Jackson to latest v2.17.1 and sync in templates #18799

Merged
merged 13 commits into from
Jun 2, 2024

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented May 31, 2024

As the title says. 🔝

Also, by adjusting the Spring Boot Jackson version import, the total number of dependencies drops by 6 (to 269 for the whole project).

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 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (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 ./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.6.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@Philzen Philzen force-pushed the change/update-and-sync-jackson branch from abce5bc to 6ff50da Compare May 31, 2024 03:38
@Philzen Philzen marked this pull request as draft May 31, 2024 03:53
@Philzen Philzen force-pushed the change/update-and-sync-jackson branch 8 times, most recently from 4436929 to 072baca Compare May 31, 2024 17:01
@wing328
Copy link
Member

wing328 commented Jun 1, 2024

please resolve the merge conflicts when you've time. thank you

@Philzen Philzen force-pushed the change/update-and-sync-jackson branch from 072baca to 34c7311 Compare June 1, 2024 23:41
@Philzen
Copy link
Contributor Author

Philzen commented Jun 1, 2024

please resolve the merge conflicts when you've time. thank you

Ready :)

@Philzen Philzen changed the title Update Jackson to latest v2.17.1 and sync in templates Bump Jackson to latest v2.17.1 and sync in templates Jun 1, 2024
@Philzen Philzen marked this pull request as ready for review June 2, 2024 02:23
@Philzen Philzen force-pushed the change/update-and-sync-jackson branch from 2f792c7 to 9e75519 Compare June 2, 2024 03:46
@Philzen
Copy link
Contributor Author

Philzen commented Jun 2, 2024

@wing328

Now also updated the library descriptions with version numbers (all of them) as some were completely off:

supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1");
supportedLibraries.put(JERSEY3, "HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1");
supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1");
supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)");
supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1");
supportedLibraries.put(WEBCLIENT, "HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1");
supportedLibraries.put(RESTCLIENT, "HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1");
supportedLibraries.put(RESTEASY, "HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1");
supportedLibraries.put(VERTX, "HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1");
supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1");
supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8");
supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+");
supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client " + MICROPROFILE_REST_CLIENT_DEFAULT_VERSION + " (default, set desired version via `" + MICROPROFILE_REST_CLIENT_VERSION + "=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1");
supportedLibraries.put(APACHE, "HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1");

Wonder how we could ensure this doesn't get out-of-sync the next time some dependency get's updated. Probably managing all of it in a constant, such as JavaClientCodegen.MICROPROFILE_REST_CLIENT_DEFAULT_VERSION already does (it is applied in the template directly).

Branch is rebased now but CI will keep failing before being rebased on #18826

@wing328
Copy link
Member

wing328 commented Jun 2, 2024

Wonder how we could ensure this doesn't get out-of-sync the next time some dependency get's updated

my take is to simply omit the version number or just use 5.x instead of something of 5.1.8 as we generally don't document the library version in the description in other generators (e.g. PHP, Python, etc)

@wing328 wing328 merged commit 2b9949a into OpenAPITools:master Jun 2, 2024
182 of 183 checks passed
@wing328 wing328 added this to the 7.7.0 milestone Jun 2, 2024
welshm pushed a commit to welshm/openapi-generator that referenced this pull request Jun 5, 2024
)

* Drop separate version property

Not required as all Jackson packages usually tether on a version bump.

* Update Jackson to v2.17.1

* Sync Jackson version used by Spring Boot with project version

* Sync jackson update to v2.17.1 with generator templates

* Regenerate samples with updated versions

* Adjust test to current exception msg behavior

* Add dependency mgmt to ensure matching version for transitive dependencies

* Update library descriptions with correct Jackson version number

* Update library descriptions with correct GSON and JSONB versions

* Update retrofit library description with correct version number

* Update retrofit description to include Jackson as an option

This should have been done as part of in OpenAPITools#16853.

* Update remaining libary version descriptions with correct versions

* Generate updated doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants