Rule "ibm-success-response-example" fails for some operations but not others

オープン
#643 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, openapi
領域
api, tooling

調査の方向性

まず、「ibm-success-response-example」ルールの動作を、レスポンススキーマが検証を通る操作と通らない操作で再現し、その後、それらのスキーマを Swagger UI が生成する例と比較します。issue にはファイルやテストが記載されていないため、最初のステップはルールの実装と関連するテストカバレッジを見つけることです。完了とみなすには、不足しているスキーマ要件について明確に説明するか、明確な validator の変更を定義し、異なる操作を対象とするテストでカバーする必要があります。

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

説明

I'd like to understand why the above rule complains for some operations, but not others, even if I haven't explicitly defined examples in any of the api responses.
It seems that in some cases the rule accepts that an example can be generated based on the schema of the response, and in other cases the schema is not enough.

Is there a way to tell what's missing from the inadequate schemas?

Also, Swagger UI shows auto generated examples for all my operations, so it's difficult to understand what's missing from some schemas

主要言語
JavaScript
スター
635
フォーク
98
平均マージ
1日 5時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

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

IBM/openapi-validator のほかの issue

IBM/openapi-validator の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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