知识卡片
接口版本保护契约演进
接口变化可能破坏已有客户端,版本标识允许新旧契约在迁移期间并存。版本可以放在路径、请求头或内容协商中;版本号只是区分契约的工具,还需要明确兼容范围和迁移安排。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Architecture of Distributed Systems · 查看原书依据
As your system evolves, it is essential to version your API to maintain backward compatibility. API versioning allows you to introduce changes and new features without breaking existing clients. Common approaches include using version numbers in the URL path or headers, or employing content negotiation to specify the desired version.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第03章《Architecture of Distributed Systems》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch03.xhtml)
- 结论依据:原文给出本卡对象的职责及相关使用情境,本卡保留相应边界,不将具体产品功能或概述推广为无条件保证。
- 原始内容:As your system evolves, it is essential to version your API to maintain backward compatibility. API versioning allows you to introduce changes and new features without breaking existing clients. Common approaches include using version numbers in the URL path or headers, or employing content negotiation to specify the desired version.