Comparing OpenAPI 3.0.1 to 3.1.0 does not work
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, java, openapi
- Domain
- api, backend-api-design
Research direction
Start with the CLI entry point in Main.java and the specification-loading path in OpenApiCompare.java, especially the calls shown in the stack traces. Reproduce the Docker and brew commands with identical 3.0.1 and 3.1.0 documents, then compare their behavior. Done means valid comparisons work across these versions without reporting identical documents as incompatible or failing to read them.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 191
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenAPITools/openapi-diff
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenAPITools/openapi-diff#506 ·
Maintainers usually reply within 5 days
-
HtmlRender: Notes of Parameters shows always the new descriptionPossibly taken @Inf1mum claimed this 6 days ago. Opengood first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenAPITools/openapi-diff#364 ·
Maintainers usually reply within 5 days
-
Render capabilities
Difficulty 5/5 Over a week Newbie friendliness 20/100
OpenAPITools/openapi-diff#959 ·
Maintainers usually reply within 5 days
-
Render capabilities
Difficulty 5/5 Over a week Newbie friendliness 18/100
OpenAPITools/openapi-diff#958 ·
Maintainers usually reply within 5 days
-
Render capabilities
Difficulty 3/5 1-2 days Newbie friendliness 55/100
OpenAPITools/openapi-diff#957 ·
Maintainers usually reply within 5 days
All issues in OpenAPITools/openapi-diff
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
eclipse-tradista/tradista#371 ·
Maintainers usually reply within 1 day
-
critical
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mars-sim/mars-sim#2199 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
projeto-ong-amar/projeto-ong-amar-backend#26 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
primefaces/primefaces#15568 ·
Maintainers usually reply within 1 day
-
崩溃日志只按 CRLF 分行Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PCL-Community/PCL-CE#3872 ·
Maintainers usually reply within 1 day