OpenAPITools / OpenAPITools/openapi-diff
`--state` option outputs `metadata`
未关闭
还没有人认领这个 Issue。
good first issue
- 主要语言
- Java
- 星标
- 1.1k
- 派生
- 190
- PR 合并指标
- 30 天内没有已合并 PR
描述
From help,
--state Only output diff state: no_changes,
incompatible, compatible
this doesn't align with reality. We had a case where the state outputted metadata.
Caused by this line:
https://github.com/OpenAPITools/openapi-diff/blob/1de574d3ca447bc463740bc10c37851702974a00/cli/src/main/java/org/openapitools/openapidiff/cli/Main.java#L203
to include something like
public DiffResult toStateDiff() {
if (this.isUnchanged()) {
return DiffResult.UNCHANGED;
}
if (this.isCompatible()) {
return DiffResult.COMPATIBLE;
}
return DiffResult.INCOMPATIBLE;
}
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 cli/src/main/java/org/openapitools/openapidiff/cli/Main.java 中处理 --state 的部分开始,然后阅读 core/src/main/java/org/openapitools/openapidiff/core/model/DiffResult.java 及其 state 值。确认 --state 只报告 no_changes、compatible 或 incompatible,并验证不再发出 metadata 结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 50/100