OpenAPITools / OpenAPITools/openapi-generator

[REQ] [Java] Upgrade to jackson 2.20.0

Open
#21,930 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

We're unable to consume jackson:2.20 in our Kotlin repo because of deprecations in this release that are not addressed in the latest version of openapi-generator.

For instance, openapi-generator auto-generates a file Serializer.kt that uses the deprecated function .setSerializationInclusion (docs):

object Serializer {
    @JvmStatic
    val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
        .findAndRegisterModules()
        .setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
        .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
        .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
}

Describe the solution you'd like

openapi-generator:7.15.0 still uses jackson:2.18.2. Request to upgrade to jackson:2.20.

Describe alternatives you've considered

  • Continue to use older versions of jackson
  • Look into alternatives to openapi-generator (which wouldn't be ideal)

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pom.xml around the referenced Jackson dependency at line 1243, then inspect the generated Kotlin Serializer.kt example and the surrounding generator configuration. Update the dependency target to Jackson 2.20 and verify that generated output remains compatible with that release without the reported deprecated usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
api, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.