Skip to content

Support oneOf without $ref references #176

Closed

Description

@xuorig

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.

Activity

  1. gsdatta commented on Jan 11, 2021

    @gsdatta
    Contributor

    Seeing the same issue

  2. added a commit that references this issue on Apr 23, 2021
    2a8648c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions