知识卡片
词汇描述覆盖数据与动作
完整语义词汇须包含数据字段、链接、表单与查询动作的标识及解释,不能只做数据库字段表。它说明业务名字是什么、可能出现在哪里;媒体类型另行说明如何解析结构。
例如filter表示筛选动作,在Collection+JSON与FormsJSON中可能位于不同的name/rel/id位置。支持多格式时须给出映射,不能把语义词汇和某种JSON层级绑死。profile补充表示的语义,不改变媒体类型自身规则。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 超媒体服务 · 查看原书依据
It is worth pointing out that these semantic profiles do not explain how the filter hypermedia control works—just that it might appear in the response. Semantic profiles assume the API consumer application understands that media type is independent of the profile. This separation between understanding message formats and understanding the semantics within the message is an important feature of well-designed hypermedia services.
参考来源
- 位置:《RESTful Web API Patterns and Practices Cookbook》第5章《Hypermedia Services》(来源项目book-sources:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch05.xhtml,配方5.7)
- 结论依据:原文列出person词汇及其在不同媒体类型中的位置,明确profile不负责解释控制的格式规则。
- 原始内容:It is worth pointing out that these semantic profiles do not explain how the filter hypermedia control works—just that it might appear in the response. Semantic profiles assume the API consumer application understands that media type is independent of the profile. This separation between understanding message formats and understanding the semantics within the message is an important feature of well-designed hypermedia services.