OpenAPITools / OpenAPITools/openapi-diff

Operations are detected as changed when comparing for open api version 3.0.1 and 3.1.0

Open
#858 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OpenAP 3.1.0 Support
Dominant language
Java
Stars
1.1k
Forks
190
PR merge metrics
No merged PRs in 30d

Description

By comparing the two definitions attached the only difference is the open api version (3.0.1 against 3.1.0)

sample-api_3.47.0_ALL.json
sample-api_3.48.0_ALL.json

The operations are detected as changed and only repeat the parameters e.g. query, sort request parameters in one case, path parameters in the others) while nothing has changed in the operations.

testDiff.html

If we change the open api version in one definition to match the other, no changes are detected as expected

Report was generated by using the example code in home page by specifying rendering all changes i.e.
HtmlRender htmlRender = new HtmlRender("Changelog", "http://deepoove.com/swagger-diff/stylesheets/demo.css", true);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two attached OpenAPI JSON definitions and reproduce the report using the homepage example with HtmlRender configured to render all changes. Compare the operation and parameter diff output when only the OpenAPI version changes. Done means the version-only comparison reports no operation or parameter changes, as shown by testDiff.html.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.