Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG][KOTLIN] Jackson3 option does not discover modules like Jackson2 does

オープン 初心者向け
#24,859 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
kotlin
領域
tooling

調査の方向性

kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache から始め、useJackson3 が false のときに生成される Jackson 2 の出力と useJackson3 ブロックを比較します。報告されたオプションを使用して jvm-spring-restclient クライアントを生成し、Jackson 3 が JsonNullableJackson3Module などのクラスパスモジュールを検出し、JsonNullable フィールドを正しく処理することを確認します。

索引モデルが issue の本文から書いたものです。

説明

Issue: Bug
Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Serializer generated with useJackson3: true is different from the one generated for Jackson 2: it does not load modules.

Any third-party Jackson 3 module on the classpath is silently ignored. Concrete case: org.openapitools:jackson-databind-nullable:0.2.11 ships META-INF/services/tools.jackson.databind.JacksonModule → JsonNullableJackson3Module, which never gets registered, so JsonNullable fields serialize/deserialize wrongly

openapi-generator version

7.25.0; not a regression, rather a bug in a new feature added in #24709

OpenAPI declaration file content or url

N/A (the bug is in the infrastructure code, not in models)

Generation Details
eneratorName: kotlin
  configOptions: 
    library: jvm-spring-restclient
    serializationLibrary: jackson
    useSpringBoot3: true
    useSpringBoot4: true
    useJackson3: true
Steps to reproduce

Open <pkg>/infrastructure/Serializer.kt

Actual:

 val jacksonObjectMapper: JsonMapper = jsonMapper {
      addModule(kotlinModule())
      ...
  }

Expected: parity with the Jackson 2 output, which is generated from the same template with
useJackson3: false

 val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
      .findAndRegisterModules()
      ...
Related issues/PRs

#24709

Suggest a fix

Change kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache; add findAndAddModules() as the first line of the {{#useJackson3}} jsonMapper { … } block.

主要言語
Java
スター
26.8k
フォーク
7.7k
平均マージ
3日 16時間
マージ済み PR(30日)
122

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenAPITools/openapi-generator のほかの issue

OpenAPITools/openapi-generator の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。