Closed
Description
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.