知识卡片

普通读书笔记卡 · 2275.as.6.f.3.c.9.b.1.b.1 · 生成模型:未记录

自动识别破坏性变更

理解等级:中级

破坏性变更使既有客户端只有修改才能继续工作。删除已被调用的路径会令同一请求得到 404。把可选输入改为必填也会使原本有效的请求失效。检查时固定旧定义为基线、候选定义为新版本,用约定的兼容规则生成报告,再把错误、警告和已批准的计划内下线送入不同处理流程。

若目标是比较两个主版本之间除路径之外的变化,可先对齐版本前缀,再找操作及数据约束变化。OpenAPI 差异检查覆盖定义里能表达的变化,还要结合实现级验证和已知消费者的使用信息。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 破坏性变更与 API 演进 4.4 Detecting breaking changes · 查看原书依据

      A breaking change is a change that forces an API consumer to change their code to ensure their application keeps working. In other words, it’s a non–backward-compatible API change that causes client applications that integrate with the API to stop working or suffer degraded service. For example, removing an API path (e.g., /v1/catalog/categories in the previous scenario) means that existing consumers who make a call to that endpoint now receive a 404 Not Found error.

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 04 章 破坏性变更与 API 演进》(4.4 Detecting breaking changes;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-4.xhtml#p48) - 结论依据:给出破坏性变更的用户影响与删除路径的直观例子。 - 原始内容:A breaking change is a change that forces an API consumer to change their code to ensure their application keeps working. In other words, it’s a non–backward-compatible API change that causes client applications that integrate with the API to stop working or suffer degraded service. For example, removing an API path (e.g., /v1/catalog/categories in the previous scenario) means that existing consumers who make a call to that endpoint now receive a 404 Not Found error.