知识卡片
操作标签与分类说明
在操作上写标签名称,把接口归入使用者找得见的类别。顶层再按相同名称补 description 或 externalDocs。按业务任务分组比把使用者留在一长串方法和路径中检索更清楚。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Preparing and hosting API documentation 8.4 Organizing operations with tags · 查看原书依据
To add a description to a tag, we need to create a root-level tags field (with “root-level” meaning outside of the operation) and describe our tags in it.
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第08章《Preparing and hosting API documentation》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch08.htm,阅读块 143)
- 结论依据:书中用顶层 tags 定义可供操作名称引用的标签描述。
- 原始内容:To add a description to a tag, we need to create a root-level tags field (with “root-level” meaning outside of the operation) and describe our tags in it.