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

Verbose CLI output to help troubleshoot (especially in composed mode) #495

Closed
anikitin opened this issue Feb 24, 2024 · 5 comments · Fixed by #498
Closed

Verbose CLI output to help troubleshoot (especially in composed mode) #495

anikitin opened this issue Feb 24, 2024 · 5 comments · Fixed by #498

Comments

@anikitin
Copy link

anikitin commented Feb 24, 2024

Trying to troubleshoot an issue when running oasdiff in composed mode (I use oasdiff 1.10.9)
It really lacks the option to show what file (and endpoint/operation) it is currently processing.

I.e. I am trying to generate a changelog from a tree with hundreds of openapi files in composed mode (with --flatten-allof).
And I am getting just this in output:

Error: failed to load base specs from glob "../api-metadata-specs2/openapi/*/*-openapi.yml" with unable to resolve Enum conflict: intersection of values must be non-empty

At this point I just need something like --verbose to get more information about where it stopped.
Then I will try to figure out what is wrong top report a different issue (maybe)

@anikitin
Copy link
Author

@reuvenharrison , any hint on how to understand what file/element is triggering this error?

@tcdsv
Copy link
Collaborator

tcdsv commented Feb 27, 2024

Hey
This error occurs when trying to merge schemas that have entirely separate enum value sets. Because there are no shared enum values, there is no data that could be considered valid against both of the schemas.

This kind of issue can appear in schemas that use an allOf component and have more than one enum field.

@anikitin
Copy link
Author

anikitin commented Feb 28, 2024

@tcdsv , thanks. I would be happy to dig deeper into this problem, but I need to understand what particular file and schema triggered it (out of 200+ I included into scan)...

Actually all our specs are validated and linted, so there should be no incompatibilities in terms of OpenAPI standard.

@reuvenharrison
Copy link
Collaborator

reuvenharrison commented Feb 28, 2024

Hi @anikitin,
As a first step to resolve this I suggest adding the problematic file name to the error message, like this:

Error: failed to load base specs from glob "../api-metadata-specs2/openapi/*/*-openapi.yml" with failed to load "path-to-problematic-file" with unable to resolve Enum conflict: intersection of values must be non-empty

What do you think?

@reuvenharrison reuvenharrison linked a pull request Feb 28, 2024 that will close this issue
@anikitin
Copy link
Author

@reuvenharrison , yes, for sure. But since files can be pretty big we need also to refer somehow to problematic schema/component within this file as well.

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