-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: disable map tag summary
and description
from the OpenAPI Operation
to PathItem
#2823
Conversation
…eration` to `PathItem`
@WankkoRee 感谢您的贡献,我需要花点时间仔细看看哈。 |
@WankkoRee Thanks for your contribution, I need to take a moment to take a closer look ha. |
@WankkoRee CI失败了请看看呢,另外请增加该修改对应的单测哈。 |
@WankkoRee CI failed, please take a look, and please add the single test corresponding to this modification. |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2823 +/- ##
==========================================
+ Coverage 79.22% 79.29% +0.06%
==========================================
Files 633 626 -7
Lines 52242 51952 -290
==========================================
- Hits 41391 41194 -197
+ Misses 8808 8734 -74
+ Partials 2043 2024 -19
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
单测已修复。 |
Single test has been fixed. |
因为当前 tag 都是针对 Operation 对象设置的,不应该将 Operation 的 summary 和 description 直接添加到 PathItem 。
如存在
POST /user
的 summary 为新增用户
,存在DELETE /user
的 summary 为删除用户
,两者为相反操作,其 PathItem 的 summary 应当留空而不是使用其中一个。实际测试:
各家支持解析 OpenAPI 的工具对于 PathItem 中的 summary 和 description 并不友好,所以理论上不太存在需要自定义这两个字段的需求。
如 Apifox 会把 summary 当成一个方法: