知识卡片
规范差异识别破坏变更
在交付流水线比较新旧 OpenAPI 规范,可提前发现字段改名等消费者可能依赖的破坏性修改。差异工具只看规范能表达的形状,无法替代行为兼容性检查;还需确认工具支持所用 OpenAPI 版本,否则“未发现问题”可能只是工具盲区。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
We will start with a breaking change: we will change the name of the givenName field to firstName. This is a breaking change because consumers will be expecting to parse givenName, not firstName.
参考来源
- 位置:《Mastering API Architecture》第1章《Design, Build, and Specify APIs》之《OpenAPI Specification and Versioning》(源文件:_epub-src/OEBPS/ch01.xhtml)
- 结论依据:原文以 givenName 改 firstName 和增加 age 字段对比,并提醒 diff 工具会受 OpenAPI 规范版本支持限制。
- 原始内容:We will start with a breaking change: we will change the name of the givenName field to firstName . This is a breaking change because consumers will be expecting to parse givenName , not firstName .