Skip to content

Support oneOf without $ref references #176

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

Closed
xuorig opened this issue Oct 5, 2020 · 1 comment · Fixed by #220
Closed

Support oneOf without $ref references #176

xuorig opened this issue Oct 5, 2020 · 1 comment · Fixed by #220
Labels

Comments

@xuorig
Copy link

xuorig commented Oct 5, 2020

Hey folks, I was trying to diff two large OpenAPI descriptions and I could not get it working due to this exception:

Unexpected exception. Reason: invalid oneOf schema

It's coming from here: https://github.com/OpenAPITools/openapi-diff/blob/master/core/src/main/java/com/qdesrame/openapi/diff/core/compare/schemadiffresult/ComposedSchemaDiffResult.java#L101-L104

I noticed it seems to expect that the schemas under oneOf are references, and not an inline schema? For example:

schema:
  oneOf:
  - type: string
  - type: object
     properties:
       a:
         type: string

Should be valid OpenAPI☝️ But this causes the exception.

@quen2404 quen2404 added the bug label Oct 16, 2020
@gsdatta
Copy link
Contributor

gsdatta commented Jan 11, 2021

Seeing the same issue

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

Successfully merging a pull request may close this issue.

3 participants