Portable schema IDs cascade from the root document digest, so any root edit rotates every ID in generated output
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- julia, openapi
調査の方向性
src/normalize.jl の _portable_schema_ids から始め、_content_digest、parent、pointer、keyword がそれぞれの label をどのように形成するかを追跡する。既存の衝突サフィックス処理を維持しつつ、無関係な root の編集によって external- IDs が変わらないようにする。IDs は決定的であり続け、参照先の schema が変わったときに変わるべきである。
索引モデルが issue の本文から書いたものです。
説明
Generated clients embed a _SCHEMA_RESOURCE_DATA table keyed by https://openapi.invalid/schema/.json. The labels are content-derived, and the derivation chains every label back to the root document's digest. The practical effect is that editing one field anywhere in the root spec rotates every schema ID in the generated package. So for every update in the schemas the changes are massive in the autogenerated code.
The source of this problem is here
src/normalize.jl, _portable_schema_ids:
labels = Dict{Resources.ResourceId,String}(
primary.id => "root-" * first(_content_digest(primary.contents), 20),
)
...
seed = parent * "|" * pointer * "|" * keyword
labels[target] = "external-" * first(bytes2hex(SHA.sha256(seed)), 20)
_content_digest is sha256 over the canonical JSON of the whole root document, so it covers info.version, info.description, and every unrelated part of the spec.
Each external- label is then seeded on its parent label, which is the root label for first-level references and another derived label deeper down. So the root digest propagates transitively into every ID in the graph.
The fix entails decoupleing each label from the root digest, so an ID changes only when that schema changes:
- Seed external- labels on the target resource's own _content_digest, rather than on the parent label. Collisions already have handling via the -2, -3 suffix loop in the remaining branch just below.
- Or seed on the structural reference path from a stable root identifier (for example the spec's info.title) instead of the root's content hash.
Either keeps IDs stable under unrelated root edits while preserving determinism and uniqueness.
- 主要言語
- Julia
- スター
- 56
- フォーク
- 16
- 平均マージ
- 1日 51分
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaComputing/OpenAPI.jl のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaComputing/OpenAPI.jl#128 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaComputing/OpenAPI.jl#118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
JuliaComputing/OpenAPI.jl#113 ·
メンテナーはふだん 1 日以内に返信
-
stale
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
JuliaComputing/OpenAPI.jl#87 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
stale
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaComputing/OpenAPI.jl#73 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
JuliaComputing/OpenAPI.jl の issue をすべて見る
似ている issue
-
add-on doc enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaGraphics/ColorTypes.jl#344 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EnzymeAD/Enzyme-JAX#3286 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
SciML/LinearSolve.jl#1359 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信