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

OASDIFF giving error with API specifications with multiple callbacks #168

Closed
taranjotkaur21 opened this issue Jan 5, 2023 · 5 comments · Fixed by #178
Closed

OASDIFF giving error with API specifications with multiple callbacks #168

taranjotkaur21 opened this issue Jan 5, 2023 · 5 comments · Fixed by #178

Comments

@taranjotkaur21
Copy link

taranjotkaur21 commented Jan 5, 2023

Describe the bug
Getting the error "diff failed with request body reference is nil" while running the oasdiff between two API spec yaml files. It is giving this error in the scenario where specs files have more than one callback tag defined. Files getting compared are identical, then also getting this error.

To Reproduce
Steps to reproduce the behavior:

  1. Run oasdiff -base spec_1.yaml -revision spec_2.yaml

  2. attached spec_1 and spec_2
    Files.zip

  3. Snippet attached of the error for the comparison of two identical files
    snippet_error

Expected behavior
No output is expected as both files are identical

Screenshots
NA

Desktop (please complete the following information):

  • OS: [e.g. iOS] - Windows 10
  • Browser [e.g. chrome, safari] - Local
  • Version [e.g. 22]

Smartphone (please complete the following information):
NA

Additional context
NA

@taranjotkaur21
Copy link
Author

Any update on the above issue?

@reuvenharrison
Copy link
Collaborator

Hi @taranjotkaur21,
Thanks for submitting the issue. I was on vacation for a few days.
I'll take a look today or tomorrow at the latest.
Reuven

@reuvenharrison
Copy link
Collaborator

It looks like this is caused by a bug the underlying https://github.com/getkin/kin-openapi package.
It can be replicated by loading either one of the specs you provided here and noticing that some of the request bodies within the callbacks are not resolved.
@fenollp could you please take a look and let me know if you need more details to replicate.

@fenollp
Copy link

fenollp commented Feb 3, 2023

Hi @reuvenharrison sorry I missed your hl.
Was this getkin/kin-openapi#757 the fix you were looking for?
Thanks

@reuvenharrison
Copy link
Collaborator

Yes @fenollp - this is the fix we needed.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants