知识卡片

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

公开API兼容政策

理解等级:中级

兼容政策由 API 提供方发布,明确版本选择方式、版本范围、命名、稳定性、支持日程及破坏性规则。收紧请求将曾经接受的输入排除在外。放宽响应可能打破客户端依赖的保证,例如必填字段改可选、列表长度上限扩大,或加入闭合枚举不能反序列化的新值。

规则清单既指导消费者增加容错,也约束设计评审与差异门禁。工具默认集合与组织政策可能有差别,需通过已知案例核对并补充。公开契约还要考虑调用方可能已经依赖正常可见但未明确记录的行为。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 破坏性变更与 API 演进 4.11 Breaking change policy · 查看原书依据

      Defining and publishing the list of what you consider breaking and nonbreaking changes is important so that your API consumers can consider this information when building their client integrations. Based on your list, you can create automated checks for breaking changes using OpenAPI diff tools or other scripts. Table 4.1 lists examples of breaking changes, but note that organizations may differ on what changes they consider breaking.

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 04 章 破坏性变更与 API 演进》(4.11 Breaking change policy;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-4.xhtml#p231) - 结论依据:说明定义并发布组织自己的规则,处理枚举和差异工具口径分歧。 - 原始内容:Defining and publishing the list of what you consider breaking and nonbreaking changes is important so that your API consumers can consider this information when building their client integrations. Based on your list, you can create automated checks for breaking changes using OpenAPI diff tools or other scripts. Table 4.1 lists examples of breaking changes, but note that organizations may differ on what changes they consider breaking.