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

未關閉
#643 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
32/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
javascript, openapi
領域
api, tooling

研究方向

首先,使用 response schema 通過和不通過的 operation 重現「ibm-success-response-example」規則的行為,然後將這些 schema 與 Swagger UI 產生的範例進行比較。該 issue 沒有指定檔案或測試,因此第一步是定位規則實作和相關的測試涵蓋範圍。完成的標準是:明確說明缺少的 schema 要求,或定義 validator 的變更,並透過測試涵蓋這些不同的 operation。

由索引模型根據 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 小時
30 天內合併 PR
8

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

IBM/openapi-validator 的其他 Issue

查看 IBM/openapi-validator 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。