知识卡片
语义版本标示兼容性
语义版本用主、次、补丁三段表达变化承诺:主版本对应不兼容修改,次版本对应向后兼容的新能力,补丁版本对应既有功能的修复。它帮助消费者判断升级动作,但版本号本身不能证明兼容;仍需用契约差异和行为测试核验实际变更。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
Semantic versioning defines a numerical representation attributed to an API release. That number is based on the change in behavior in comparison to the previous version, using the following rules: A major version introduces noncompatible changes with previous versions of the API. In an API platform, upgrading to a new major version is an active decision by the consumer. There is likely going to be a migration guide and tracking as consumers upgrade to the new API.
参考来源
- 位置:《Mastering API Architecture》第1章《Design, Build, and Specify APIs》之《Semantic Versioning》(源文件:_epub-src/OEBPS/ch01.xhtml)
- 结论依据:原文逐一定义 major、minor、patch 在 API 发布中的兼容含义,并用 Major.Minor.Patch 格式说明消费者何时需主动迁移。
- 原始内容:Semantic versioning defines a numerical representation attributed to an API release. That number is based on the change in behavior in comparison to the previous version, using the following rules: A major version introduces noncompatible changes with previous versions of the API. In an API platform, upgrading to a new major version is an active decision by the consumer. There is likely going to be a migration guide and tracking as consumers upgrade to the new API.