You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been tested openapi-diff to see if we can use it in our CI/CD pipeline to prevent any breaking changes from happening.
After running a few tests I've noticed that it doesn't seem to support anyOf correctly.
See the two openapi files attached. Basically the endpoint returns a response which either ResponseA or ResponseB. New file removes a required property from ResponseA and openapi-diff doesn't catch the breaking change. old.yaml
Found that the error is within the SchemaDiff class in the method Schema<?> resolveComposedSchema(Components, Schema<?>) which only considers ((ComposedSchema) schema).getAllOf() but not ((ComposedSchema) schema).getAnyOf()
So I've been tested openapi-diff to see if we can use it in our CI/CD pipeline to prevent any breaking changes from happening.
After running a few tests I've noticed that it doesn't seem to support
anyOf
correctly.See the two openapi files attached. Basically the endpoint returns a response which either
ResponseA
orResponseB
. New file removes a required property fromResponseA
and openapi-diff doesn't catch the breaking change.old.yaml
new.yaml
Result
This is a very simple test scenario, but I've tested the same one with a change like this in:
for all of them it wasn't detecting any breaking changes....
I've tested these using docker
openapitools/openapi-diff:latest
.The text was updated successfully, but these errors were encountered: