Skip to content

Support oneOf without $ref references #176

Closed
@xuorig

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.

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