← 返回起始笔记位置

知识卡片

操作参考卡 · 3487.i.1.e · 生成模型:GPT-6

操作标签与分类说明

理解等级:中级

在操作上写标签名称,把接口归入使用者找得见的类别。顶层再按相同名称补 description 或 externalDocs。按业务任务分组比把使用者留在一长串方法和路径中检索更清楚。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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.