False-positive breaking change when adding `anyOf` to a response-property-type-changed
ashb opened this issue · comments
Describe the bug
I have a response property of nextRunAt
that was before defined as:
"nextRunAt": {
"description": "Time at which the next DagRun can be created",
"format": "date-time",
"title": "Next Run At",
"type": "string"
},
And now it's changed to the following:
"nextRunAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"description": "Time at which the next DagRun can be created",
"title": "Next Run At"
},
(It's a question if it should be anyOf or oneOf, but oasdiff does the same)
A clear and concise description of what the bug is.
To Reproduce
Sorry it's not a full snippet. Hopefully the above is enough detail.
Expected behavior
Since this is adding a new type that can now be returned (null) but the existing type was still there this should not be a breaking change.
Thinking more about it I guess this could be a breaking change, as if a value (a string) was always expected before, but it could now be null then the client could break.