知识卡片

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

API弃用与下线窗口

理解等级:中级

服务中的 API 发出弃用通知后仍可使用,既有调用方据此规划迁移,新集成应选替代接口。下线发生在通知期结束后,旧接口停止提供服务。政策应写明推荐版本、稳定期、弃用日、下线日和替代路径,给下游开发、验收与发布留窗口。

书中演示用 OpenAPI 的 deprecated 标记和 oasdiff 支持的 x-sunset 日期表达这类计划。实际移除依然会让旧调用失效,检查流程可依据已公告且到期的计划处理,而对未经通知的删除保留门禁。

安排并行期时可以用[[版本迁移的三种成本]]分别估计消费者与提供者的负担。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      Communicating your API stability levels should also include discussing your approach to deprecating and sunsetting your API, which is part of your API life cycle. Deprecation is a formal notice that continued dependence on an HTTP resource is at risk. When you deprecate an API, you discourage API consumers from using it.

    参考来源

    - 位置:《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#p249) - 结论依据:说明弃用发出迁移预警及 deprecated 字段的表达范围。 - 原始内容:Communicating your API stability levels should also include discussing your approach to deprecating and sunsetting your API, which is part of your API life cycle. Deprecation is a formal notice that continued dependence on an HTTP resource is at risk. When you deprecate an API, you discourage API consumers from using it.