Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infos/result are reported multiple times #594

Open
mouradchama opened this issue Aug 22, 2024 · 4 comments · May be fixed by #600
Open

Infos/result are reported multiple times #594

mouradchama opened this issue Aug 22, 2024 · 4 comments · May be fixed by #600
Labels
bug Something isn't working

Comments

@mouradchama
Copy link

Describe the bug
I'm testing the pluging the implement the api changelog and reporting the breraking change for our Apis.
The pluging seems working file except the noises that it generates, each info is reported mulitiple times.

To Reproduce
Steps to reproduce the behavior:

  1. The command-line, for example: oasdiff changelog oas_original.json oas_non_breaking_changes.json

  2. Spec 1:
    oas_original.json

  3. Spec 2:
    oas_non_breaking_changes.json

  4. Output
    image

Expected behavior
The infos/result should be merged and reported only once

Desktop (please complete the following information):

  • OS: WIndows
@mouradchama mouradchama added the bug Something isn't working label Aug 22, 2024
@reuvenharrison
Copy link
Collaborator

Hi @mouradchama,
I couldn't replicate this problem using the command and files you provided.
Could you please check that the instructions are precise?

Also, you mention a "plugin", I am not sure what you mean by that.

Thanks,
Reuven

@reuvenharrison
Copy link
Collaborator

Update:
I successfully replicated the issue (it didn't work yesterday due to another problem that I fixed meanwhile).
I'll update shortly with more info.

@reuvenharrison
Copy link
Collaborator

The triple messages are actually correct, each one belongs to a different media type.
The fix will change all request property messages to include the media-type, for example:
image

@reuvenharrison reuvenharrison linked a pull request Aug 28, 2024 that will close this issue
@reuvenharrison
Copy link
Collaborator

Update:
Oasdiff currently omits media-type for changes in requests and responses.
Fixing this will require adding the media type to all breaking change messages under requests and responses.
Ideally, we should also avoid displaying the media-type when there is only one media-type, this will keep messages short and readable for the majority of specs.
We will fix this in several steps:

  1. Automate message generation (see add generator package #604)
  2. Support two types of messages: with media-type and without media type
  3. Gradually add media-type to relevant checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants