知识卡片
Schema方言升级
OpenAPI 3.1 的 Schema 以 JSON Schema 2020-12 为基础,可用独立语义验证,也保留 OpenAPI 特有词汇。迁移须检查 nullable、排他边界和工具支持,JSON 与 YAML 的文件外观改变不多,实际验证语义却可能变化。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Appendix A. Swagger 2.0, OpenAPI 3.0, and OpenAPI 3.1 A.3 OpenAPI 3.1 · 查看原书依据
With OAS 3.1 gaining full support for JSON Schema (draft 2020-12), we now have the potential for better interoperability between JSON Schema tooling and OpenAPI tooling. JSON Schema 2020-12 also introduces a powerful abstraction called vocabularies. This abstraction allows OpenAPI to add
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》附录 A《Appendix A. Swagger 2.0, OpenAPI 3.0, and OpenAPI 3.1》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/A.htm,阅读块 110)
- 结论依据:附录把 3.1 对齐 2020-12 与词汇扩展联系起来。
- 原始内容:With OAS 3.1 gaining full support for JSON Schema (draft 2020-12), we now have the potential for better interoperability between JSON Schema tooling and OpenAPI tooling. JSON Schema 2020-12 also introduces a powerful abstraction called vocabularies. This abstraction allows OpenAPI to add