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
add backward compatibility for exclusiveMinimum and exclusiveMaximum (#1092)
This PR ensures backward compatibility in the schema validator for the
exclusiveMinimum and exclusiveMaximum properties, handling both the
boolean format from OpenAPI v3.0 and the numeric format from v3.1.
Documentation for this can be found here:
https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0
under the `Tweak exclusiveMinimum and exclusiveMaximum` section
Changes Made:
- Updated the Schema class to handle both boolean (v3.0) and numeric
(v3.1) formats for exclusiveMinimum and exclusiveMaximum.
- Added a handle_exclusive_min_max method to ensure that the schema is
correctly validated and converted based on the OpenAPI version.
- Added tests to ensure the correct behavior for both formats of
exclusiveMinimum and exclusiveMaximum.
---------
Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com>
0 commit comments