Adding support for exclusiveMinimum and exclusiveMaximum
Is your feature request related to a problem? Please describe.
exclusiveMinimum and exclusiveMaximum are not yet supported
"allocation": {
"type": "integer",
"exclusiveMaximum": 100,
"exclusiveMinimum": 0,
"title": "Allocation",
}
Describe the solution you'd like
implement the checker/check_response_property_exclusive_max_increased.go and checker/check_response_property_exclusive_min_increased.go as well as for decreased (i guess)
Describe alternatives you've considered Just using minimum, maximum (> 0 is equal to >= 1 for integers)
Additional context I could help with this!
I took a stab at this because I thought it would be trivial, and because I was running into error messages along the lines of "failed to unmarshal data: json error: invalid character 'o' looking for beginning of value, yaml error: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number into field Schema.exclusiveMinimum of type bool" so I figured that simply adding this pretty boilerplate logic as you have described above would fix it. I drafted that up: https://github.com/elijahcarrel/oasdiff/pull/1.
Unfortunately, it did not help. That error message just shows up in the unit tests I've written in this PR.
Digging in, it looks like the OpenAPI format changed between 3.0 and 3.1 such that "exclusiveMinimum" and "exclusiveMaximum" changed from booleans to numbers (see https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0#:~:text=Tweak%20exclusiveMinimum%20and%20exclusiveMaximum). And oasdiff uses https://github.com/getkin/kin-openapi internally to load OpenAPI schemas, and as documented in a longstanding issue on that repo (https://github.com/getkin/kin-openapi/issues/230), kin-openapi still only supports OpenAPI 3.0, not OpenAPI 3.1.
So I believe #714 cannot be solved without adding this support to the upstream kin-openapi repo.