Migrate to networknt json-schema-validator 3.x (Jackson 3 API)
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- java
調査の方向性
SchemaRegistry.getSchema(JsonNode) と Schema.validate(JsonNode) の呼び出しから開始し、次に transformer パイプラインとカスタム Format validator を追跡します。InputFormat.JSON のエントリポイントを 3.0/3.1 の dialect 分割と比較し、Jackson 3 BOM を固定します。完了の条件は、ライブラリが networknt 3.x でビルドでき、com.atlassian.oai.validator.* API が変更されず、範囲外の数値の挙動が確認されていることです。
索引モデルが issue の本文から書いたものです。
説明
networknt json-schema-validator 3.x moved its public API from Jackson 2 (com.fasterxml.jackson.databind) to Jackson 3 (tools.jackson.databind) and removed the Jackson-2 node overloads (SchemaRegistry.getSchema(JsonNode), Schema.validate(JsonNode)). This library builds against 2.0.1 and calls those overloads, so any consumer that puts networknt 3.x on the classpath gets a NoSuchMethodError when the first schema is compiled.
A property bump alone won't do it: swagger-parser produces Jackson 2 nodes while networknt 3.x consumes Jackson 3, so there's a boundary to bridge — without touching the com.atlassian.oai.validator.* public API.
Proposed approach:
- Feed networknt JSON text through its
InputFormat.JSONentry points instead of Jackson-2 nodes, leaving the transformer pipeline and the 3.0/3.1 dialect split intact. - Move the custom
Formatvalidators to Jackson 3 nodes (networknt'sFormat.matches(...)now hands them in). - Pin the Jackson 3 BOM to match what networknt depends on.
One behavior change worth confirming: a value beyond Double.MAX_VALUE is now rejected by networknt as a type error ("number expected") rather than reaching the custom double-format validator — still rejected, different error key.
Questions before I open a PR:
- Prefer the
InputFormat.JSONtext boundary, or converting nodes to Jackson 3? - Is the
format.double→typechange on out-of-range values acceptable?
Raising here first per CONTRIBUTING; I'll sign the Atlassian CLA before submitting.
- 主要言語
- Java
- スター
- 17
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
atlassian/openapi-request-validator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
-
難易度 3/5 半日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
atlassian/openapi-request-validator の issue をすべて見る
似ている issue
-
human-required sync-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/osdu-spi-file#63 ·
メンテナーはふだん 1 日以内に返信
-
frontend quick win
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
メンテナーはふだん 1 日以内に返信
-
approved
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
checkstyle/checkstyle#22129 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Add Hardcharger JDBC driver対応中かも @prmoore77 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信