[TT-16410] Validation fixes for OAS 3.1 from community#9
Merged
Conversation
buraksezer
approved these changes
Jan 21, 2026
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.
Based on this community PR: chanceattoast#1
This pull request adds support for JSON Schema 2020-12 compliant validation when working with OpenAPI 3.1 documents. The changes ensure that validation logic and schema handling are updated to accommodate features and requirements specific to JSON Schema 2020-12, and the new validation mode is automatically enabled for OpenAPI 3.1 documents.
OpenAPI 3.1 / JSON Schema 2020-12 Support:
EnableJSONSchema2020Validationoption in the validation options, allowing the validator to perform JSON Schema 2020-12 compliant validation for OpenAPI 3.1 documents (openapi3/validation_options.go,.github/docs/openapi3.txt). [1] [2]cmd/validate/main.go) to detect OpenAPI 3.1 documents and automatically enable JSON Schema 2020-12 validation when appropriate.Schema Validation Logic:
'null'type only when JSON Schema 2020-12 validation is enabled, and to pass the relevant option to default value and example validation (openapi3/schema.go,openapi3/example_validation.go). [1] [2] [3]openapi3/refs.go,openapi3/refs.tmpl). [1] [2]Other:
jsonSchema2020ValidationEnabledtoValidationOptionsto track if the new validation mode is active (openapi3/validation_options.go).refs.tmplfor clarity.