-
-
Notifications
You must be signed in to change notification settings - Fork 229
add backward compatibility for exclusiveMinimum and exclusiveMaximum #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dbanty
merged 4 commits into
openapi-generators:main
from
mikkelam:fix/exclusive-min-max-backward-compatibility
Aug 25, 2024
Merged
add backward compatibility for exclusiveMinimum and exclusiveMaximum #1092
dbanty
merged 4 commits into
openapi-generators:main
from
mikkelam:fix/exclusive-min-max-backward-compatibility
Aug 25, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…imum in schema validator
dbanty
approved these changes
Aug 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 25, 2024
> [!IMPORTANT] > Merging this pull request will create this release ## Fixes ### Allow OpenAPI 3.1-style `exclusiveMinimum` and `exclusiveMaximum` Fixed by PR #1092. Thanks @mikkelam! ### Add missing `cast` import when using `const` Fixed by PR #1072. Thanks @dorcohe! ### Correctly resolve references to a type that is itself just a single allOf reference PR #1103 fixed issue #1091. Thanks @eli-bl! ### Support `const` booleans and floats Fixed in PR #1086. Thanks @flxdot! Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
micha91
pushed a commit
to micha91/openapi-python-client
that referenced
this pull request
May 13, 2025
…penapi-generators#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>
micha91
pushed a commit
to micha91/openapi-python-client
that referenced
this pull request
May 13, 2025
> [!IMPORTANT] > Merging this pull request will create this release ## Fixes ### Allow OpenAPI 3.1-style `exclusiveMinimum` and `exclusiveMaximum` Fixed by PR openapi-generators#1092. Thanks @mikkelam! ### Add missing `cast` import when using `const` Fixed by PR openapi-generators#1072. Thanks @dorcohe! ### Correctly resolve references to a type that is itself just a single allOf reference PR openapi-generators#1103 fixed issue openapi-generators#1091. Thanks @eli-bl! ### Support `const` booleans and floats Fixed in PR openapi-generators#1086. Thanks @flxdot! Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
sectionChanges Made: