OpenAPITools / OpenAPITools/openapi-diff
Schema description update should be considered as a metadata change
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 1.1k
- 派生
- 190
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
When diffing this spec:
openapi: 3.0.3
info:
title: Test
paths:
/foo:
post:
requestBody:
content:
application/json:
schema:
type: string
description: desc v1
with this one:
openapi: 3.0.3
info:
title: Test
paths:
/foo:
post:
requestBody:
content:
application/json:
schema:
type: string
description: desc v2
I get the following output:
==========================================================================
== API CHANGE LOG ==
==========================================================================
Test
--------------------------------------------------------------------------
-- What's Changed --
--------------------------------------------------------------------------
- POST /foo
Request:
- Changed application/json
Schema: Backward compatible
--------------------------------------------------------------------------
-- Result --
--------------------------------------------------------------------------
API changes are backward compatible
--------------------------------------------------------------------------
Since only the description field changed, I would expect a "metadata" change instead of a "compatible" one.
Changes to the description are correctly marked as metadata ones internally (see here and here) but I suspect the final value that is picked up to be the default one returned here. I don't have the time or means to debug it further however.
Tested version: 2.1.0-beta.11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
复现提供的 OpenAPI diff,然后检查所引用的第 160 行附近的 core/src/main/java/org/openapitools/openapidiff/core/model/ChangedSchema.java,同时检查 ChangedMetadata.java 以及 ChangedSchema.java 中的元数据处理。完成的标准是:仅涉及 schema 描述的变更会被报告为元数据变更,而不是仅被报告为向后兼容。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100