Comparing OpenAPI 3.0.1 to 3.1.0 does not work
维护者通常 5 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, java, openapi
调研方向
从 Main.java 中的 CLI 入口点和 OpenApiCompare.java 中的规范加载路径开始,尤其关注堆栈跟踪中显示的调用。使用 3.0.1 和 3.1.0 中完全相同的文档重现 Docker 和 brew 命令,然后比较它们的行为。完成标准是:这些版本之间的有效比较能够正常工作,不会将完全相同的文档报告为不兼容,也不会读取失败。
由索引模型根据 Issue 内容生成。
描述
When running a comparison between OpenAPI 3.0.1 and 3.1.0 via Docker, it looks like everything is reported as different.
Suppressing the details gives this:
$ docker run --rm -t -v .:/specs:ro openapitools/openapi-diff /specs/api-docs-301.json /specs/api-docs-310.json --state
incompatible
ℹ Please note that those spec files are identical, only the initial OpenAPI version differs:
"openapi": "3.0.1""openapi": "3.1.0"
Comparing two specs with OpenAPI 3.1.0 seems to work as desired. ✅
I used latest which appears to be 6 weeks old - cannot get the version from the tool itself 🤷
Running the same via openapi-diff installed from brew shows a different error:
$ openapi-diff api-docs-301.json api-docs-310.json
Unexpected exception. Reason: Cannot read new OpenAPI spec
java.lang.RuntimeException: Cannot read new OpenAPI spec
at org.openapitools.openapidiff.core.OpenApiCompare.notNull(OpenApiCompare.java:107)
at org.openapitools.openapidiff.core.OpenApiCompare.fromSpecifications(OpenApiCompare.java:102)
at org.openapitools.openapidiff.core.OpenApiCompare.fromLocations(OpenApiCompare.java:91)
at org.openapitools.openapidiff.cli.Main.main(Main.java:174)
But this also does not work with two OpenAPI 3.1.0 specs:
$ openapi-diff api-docs-310.json api-docs-310.json
Unexpected exception. Reason: Cannot read old OpenAPI spec
java.lang.RuntimeException: Cannot read old OpenAPI spec
Brew shows this to be version 2.0.1 - cannot get the version from the tool itself.
- 主要语言
- Java
- 星标
- 1.1k
- 派生
- 191
- 平均合并
- 4 天 23 小时
- 30 天内合并 PR
- 1
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenAPITools/openapi-diff 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
OpenAPITools/openapi-diff#506 ·
维护者通常 5 天内回复
-
HtmlRender: Notes of Parameters shows always the new description可能已有人在做 @Inf1mum 于 6 天前认领。 未关闭good first issue help wanted
难度 2/5 1-3 小时 新手友好度 68/100
OpenAPITools/openapi-diff#364 ·
维护者通常 5 天内回复
-
Render capabilities
难度 5/5 一周以上 新手友好度 20/100
OpenAPITools/openapi-diff#959 ·
维护者通常 5 天内回复
-
Render capabilities
难度 5/5 一周以上 新手友好度 18/100
OpenAPITools/openapi-diff#958 ·
维护者通常 5 天内回复
-
Render capabilities
难度 3/5 1-2 天 新手友好度 55/100
OpenAPITools/openapi-diff#957 ·
维护者通常 5 天内回复
查看 OpenAPITools/openapi-diff 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
jenkins-infra/plugin-modernizer-tool#2070 · 1 条评论 ·
维护者通常 1 天内回复
-
Event search answers 500 when calendars, attendees or organizers holds a null element可能重新可做 关联的 PR 已关闭且未合并。 未关闭ai-driven-qa bug Minor
难度 2/5 1-3 小时 新手友好度 70/100
linagora/twake-calendar-side-service#1615 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
eclipse-tradista/tradista#371 ·
维护者通常 1 天内回复
-
critical
难度 2/5 1-3 小时 新手友好度 68/100
mars-sim/mars-sim#2199 · 2 条评论 ·
维护者通常 1 天内回复