OpenAPITools / OpenAPITools/openapi-diff

incompatible api diff result when one of property in model becomes not required

未关闭
#535 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Breaking/Non-Breaking classification
主要语言
Java
星标
1.1k
派生
190
PR 合并指标
30 天内没有已合并 PR

描述

if in new api version some property is not required anymore, new api is recognized as not compatible

old api schema definition:

"SomeDto": {
        "required": [
          "prop1",
          "prop2",
          "prop3"
        ], ...

new api schema definition:

"SomeDto": {
        "required": [
          "prop1"
        ], ...

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,复现 issue 中展示的旧 schema 定义和新 schema 定义之间的比较,然后追踪必需属性变更被归类为不兼容的位置。完成的标准是 diff 能正确处理属性变为可选属性的情况,并包含一个覆盖示例 schema 的回归测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, openapi
领域
api, backend-api-design
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。