← 返回起始笔记位置

知识卡片

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

媒体类型的命名示例

理解等级:中级

在特定响应的 content 媒体对象中用 examples 保存命名样本,每项含 value,可附 summary。给空、少量、多项和错误保留独立样本。文档、模拟器和测试可重用这一组场景。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第12章《Implementing frontend code and reacting to changes》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch12.htm,阅读块 68) - 结论依据:多例直接放在 Media Type Object,并用 summary 与 value 描述。 - 原始内容:In the OpenAPI specification, the examples field can be found under the Media Type Object (https://designapis.com/oas/3#media-type-object). You can see a Media Type Object—which is the formal name for a segment of an OpenAPI definition that describes the content of a request or