知识卡片
用元数据汇集API资产
接口的文档、安全、定义和维护信息散落时,消费者难以完整发现可用资产。
API元数据文档集中列出名称、入口、说明、定义文件、工具、共同属性与维护者,使消费者可发现操作所需资产。书中采用APIs.json,并以rel="service-meta"和/apis.json公布位置。
这份目录描述接口周边信息,不负责完整定义接口;具体契约仍应链接OpenAPI等SDD。可通过properties.type加入安全、限流、状态页等资产,也可扩展,但必须保持兼容。书中的APIs.json版本及搜索引擎状态属于2022年背景。
关联:[[公开服务定义入口]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 超媒体服务 · 查看原书依据
A very dependable way to catalog and publish API metadata is to use the APIs.json open specification. It has a vocabulary and structural layout that covers most of the important metadata elements for APIs (basic definitions, properties of the API, important URLs, key contacts and maintainers, etc.). It is also extensible so API providers can, when needed, expand the APIs.json document (in a backward-compatible way) to fit their needs.
参考来源
- 位置:《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.10)
- 结论依据:原文解释APIs.json文档的目录结构、service-meta发现及扩展属性,并与具体接口定义区分。
- 原始内容:A very dependable way to catalog and publish API metadata is to use the APIs.json open specification. It has a vocabulary and structural layout that covers most of the important metadata elements for APIs (basic definitions, properties of the API, important URLs, key contacts and maintainers, etc.). It is also extensible so API providers can, when needed, expand the APIs.json document (in a backward-compatible way) to fit their needs.