[TT-16408] add full exclusive maximum and exclusive minimum support#10
Open
[TT-16408] add full exclusive maximum and exclusive minimum support#10
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
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 pull request enhances support for OpenAPI Specification (OAS) 3.1's handling of
exclusiveMinimumandexclusiveMaximumby allowing these schema properties to be represented as either booleans (OAS 3.0 style) or numeric values (OAS 3.1 style). The changes update the internal schema representation, conversion logic, validation routines, and add new test data to ensure correct handling of both OAS 3.0 and OAS 3.1 forms.Schema Representation and Serialization:
Schemastruct inopenapi3/schema.goto storeexclusiveMinimumandexclusiveMaximumas pointers, allowing for both boolean (ExclusiveMinBool,ExclusiveMaxBool) and numeric (ExclusiveMin,ExclusiveMax) forms. Serialization and deserialization logic was updated to handle both OAS 3.0 and 3.1 representations. [1] [2] [3] [4] [5] [6] [7] [8]Schema Validation Logic:
exclusiveMinimumandexclusiveMaximum, ensuring compliance with both OAS 3.0 and OAS 3.1. [1] [2] [3]OpenAPI 2.0/3.0/3.1 Conversion:
exclusiveMinimumandexclusiveMaximumappropriately between boolean and numeric forms, preserving the correct semantics during conversion. [1] [2] [3] [4] [5] [6] [7] [8]Testing Improvements:
exclusiveMinimumandexclusiveMaximum, including a new helper for boolean pointers and new test data for OAS 3.1. [1] [2] [3] [4]API Enhancements:
Schematype for setting both boolean and numeric forms ofexclusiveMinimumandexclusiveMaximum.These changes ensure robust support for both OAS 3.0 and 3.1 schema validation and conversion, and improve the flexibility and correctness of the OpenAPI tooling.