知识卡片
超媒体链接与状态
超媒体让客户端从当前响应发现可走的相关链接,少在客户端写死后续地址。链接反映当下资源状态,客户端仍要懂链接的业务含义,OpenAPI 的链接描述不能替业务协议决定动作。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Introducing APIs and OpenAPI 1.6 What about REST? · 查看原书依据
In Fielding’s REST paper, he mentions the idea of hypermedia: a system of returning context-aware links in the form of URIs. For example, if you were to execute a GET on a /users/{userId} resource, it could return a link (a URI) to
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第01章《Introducing APIs and OpenAPI》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch01.htm,阅读块 73)
- 结论依据:用户资源示例展示响应可给登录和重置密码等相关 URI。
- 原始内容:In Fielding’s REST paper, he mentions the idea of hypermedia: a system of returning context-aware links in the form of URIs. For example, if you were to execute a GET on a /users/{userId} resource, it could return a link (a URI) to