Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Clarification required for templated paths with same hierarchy but different templated names and methods

未關閉
#2,530 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
文件
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
openapi
領域
api, documentation

研究方向

閱讀 OpenAPI 3.0.3 的「Patterned Fields」部分和連結的 Issue 2015 留言,然後將該規則與 GET /pets/{petId} 和 DELETE /pets/{name} 範例進行比較。完成的標準是規格明確說明 HTTP 方法不同時是否允許使用不同的 templated names。

由索引模型根據 Issue 內容生成。

描述

clarification request matching

This is alluded to by @kapone89 in Issue 2015 but I believe it warrants an issue of its own to get clarification.

The spec states clearly that "Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical."

But what it there are there are two templated paths which differ by templated names and also HTTP methods? There is no ambiguity between them, as long as there is only a single path for each method, so I can't see any justification for disallowing this; the example provided by in Issue 2015 is:

GET /pets/{petId}
DELETE /pets/{name}
主要語言
Markdown
星號
31.2k
分支
9.2k
平均合併
2 天 9 小時
30 天內合併 PR
17

環境準備

從這裡開始

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

OAI/OpenAPI-Specification 的其他 Issue

查看 OAI/OpenAPI-Specification 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

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

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