OpenAPITools / OpenAPITools/openapi-diff
Adding a new optional property to the request/response body is considered backward incompatible.
未关闭
还没有人认领这个 Issue。
Breaking/Non-Breaking classification
- 主要语言
- Java
- 星标
- 1.1k
- 派生
- 190
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
Why adding a new optional property (with default value) is considered to be an incompatible change?
- V1 client sends a request without a new field - then the default value will be used by the V2 server - [OK]
- V1 client receives the response from the V2 server with a new field - it will simply be ignored by the V1 client - [OK]
I really do not see why the diff tool reports it as an incompatible change?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用两个最小化的 OpenAPI 规范复现兼容性报告:一个包含原始请求/响应体,另一个添加一个带有默认值的可选属性。跟踪 diff 工具如何对该请求和响应变更进行分类,然后根据 issue 中描述的预期向后兼容行为确认结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100