知识卡片

普通读书笔记卡 · 10296.b.1.b.1 · 生成模型:未记录

REST与接口规范分工

理解等级:中级

REST 提供围绕资源、统一接口等架构约束。资源可以是单个对象、同类集合,也可以位于父资源之下。JSON:API 对 REST API 的媒体类型、错误和报文给出具体约定。OpenAPI 规定怎样书写 HTTP API 定义,因此能用 OpenAPI 描述遵守 JSON:API 的接口,也能描述采用其他设计约定的接口。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • API Lint 与设计一致性 3.2 An API design compliance problem · 查看原书依据

      The OpenAPI Specification (OAS) is a description format for any HTTP web API—whether RESTful or not. It specifies how to describe an HTTP API in a YAML or JSON definition document. JSON:API, on the other hand, is an opinionated specification of how to design a REST API. You can represent an API that follows the JSON:API guidelines in an OAS definition document.

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 03 章 API Lint 与设计一致性》(3.2 An API design compliance problem;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-3.xhtml#p27) - 结论依据:原文对照 REST 设计规范与 HTTP 描述格式,并明确二者可组合。 - 原始内容:The OpenAPI Specification (OAS) is a description format for any HTTP web API—whether RESTful or not. It specifies how to describe an HTTP API in a YAML or JSON definition document. JSON:API, on the other hand, is an opinionated specification of how to design a REST API. You can represent an API that follows the JSON:API guidelines in an OAS definition document.