知识卡片
新增字段并迁移旧字段
先增可选 pets,保留旧 dog,当两个字段都有时按已公布的优先级读取。用 deprecated 和迁移说明引导新接入,观察旧客户端使用情况后再考虑删除。若新数据无法准确投影到旧字段,需要明确旧客户端能看到的行为。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Versioning an API and handling breaking changes 20.3 Releasing a breaking change · 查看原书依据
The only thing left to do is to tell the consumer how to use this schema, since there is now a bit of ambiguity. We’ll need to add a description.
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第20章《Versioning an API and handling breaking changes》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch20.htm,阅读块 127)
- 结论依据:书中并列 dog 与 pets,再说明两者都给时的优先级。
- 原始内容:The only thing left to do is to tell the consumer how to use this schema, since there is now a bit of ambiguity. We’ll need to add a description.