知识卡片
媒体类型的命名示例
在特定响应的 content 媒体对象中用 examples 保存命名样本,每项含 value,可附 summary。给空、少量、多项和错误保留独立样本。文档、模拟器和测试可重用这一组场景。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Implementing frontend code and reacting to changes 12.3 Building a frontend based on a mock server · 查看原书依据
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
参考来源
- 位置:《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