Filter unused OpenAPI definitions when extracting selected operations
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- openapi, typescript
調査の方向性
Start at the apiops extract command in the TypeScript CLI source and trace where the --filter operation selection prunes paths before the spec is written to specification.yaml. The fix belongs after paths are filtered: collect the $ref targets reachable from the remaining operations and keep only those components/definitions, walking transitively so shared schemas and nested items survive. Validate with an extracted spec containing an invalid definition used only by an excluded operation, then run it through Spectral — done means Spectral no longer reports errors from unreferenced definitions.
索引モデルが issue の本文から書いたものです。
説明
Command that triggered the bug
apiops extract
Expected behavior
When extracting an API with an operation filter, the generated OpenAPI specification contains only the selected operations, but retains definitions used exclusively by excluded operations.
This can cause validation to fail on an unrelated definition. For example, Spectral reports an array-items error for an invalid schema even when the operation using it was excluded.
Expected behavior
Filter the definitions to those needed by the selected operations, while preserving all transitively referenced components.
Actual behavior
The extractor removes unselected operations from specification.yaml, but still extracts definitions that are not referenced by the selected operations. As a result, validation can fail on an invalid definition unrelated to the selected operations.
apiops CLI version
1.0.5
Environment details
Environment
APIOps CLI: 1.0.5
Command: apiops extract --filter
CI: Azure DevOps with Spectral validation
CI/CD environment
None
Is this bug blocking you?
Yes
- 主要言語
- TypeScript
- スター
- 44
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/apiops-cli のほかの issue
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
Azure/apiops-cli#350 ·
-
stale
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
Azure/apiops-cli#333 · コメント 1 件 ·
-
extract fails when a policy uses set-backend-service backend-id="{{namedValue}}"対応中かも @dannyward630 が 37 日前に担当しました。 オープンstale type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Azure/apiops-cli#331 · コメント 1 件 ·
-
Docs example says products are auto-included transitively, but they aren't extracted with `products: []`対応中かも @cdayne が 27 日前に担当しました。 オープンstale type:question
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/apiops-cli#277 · コメント 1 件 ·
-
Extractor mistakes set-body json response as transitive dependency which causes pipeline failureオープンtype:bug
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
Azure/apiops-cli#349 ·
Azure/apiops-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
tashfeenahmed/freellmapi#2217 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vercel-labs/ui#1758 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nicobailon/pi-subagents#3425 ·
メンテナーはふだん 1 日以内に返信