-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TT-16410] add OAS 3.1 validation #7692
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
base: master
Are you sure you want to change the base?
Conversation
|
This pull request enhances OpenAPI 3.1 (OAS 3.1) support by automatically enabling JSON Schema 2020-12 validation for OAS 3.1+ documents. This ensures that modern schema features, such as using A comprehensive test suite has been added to verify the new validation behavior, focusing on Files Changed Analysis
Architecture & Impact Assessment
graph TD
A[Start Validation] --> B{Is OAS 3.1+?};
B -- Yes --> C[Add JSON Schema 2020-12 Option];
B -- No --> D[Use Default Options];
C --> E[Validate Document];
D --> E;
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2026-01-30T15:32:50.704Z | Triggered by: pr_updated | Commit: d864582 💡 TIP: You can chat with Visor using |
|
API Changes --- prev.txt 2026-01-30 15:32:27.583096556 +0000
+++ current.txt 2026-01-30 15:32:17.145912832 +0000
@@ -3960,8 +3960,9 @@
func (s *OAS) Validate(ctx context.Context, opts ...openapi3.ValidationOption) error
Validate validates OAS document by calling openapi3.T.Validate() function.
- In addition, it validates Security Requirement section and it's requirements
- by calling OAS.validateSecurity() function.
+ For OAS 3.1+ documents, JSON Schema 2020-12 validation is automatically
+ enabled. In addition, it validates Security Requirement section and its
+ requirements by calling OAS.validateSecurity() function.
type OAuth struct {
// Enabled activates the OAuth middleware. |
Security Issues (1)
✅ Architecture Check PassedNo architecture issues found – changes LGTM. Performance Issues (1)
Quality Issues (2)
Powered by Visor from Probelabs Last updated: 2026-01-30T15:32:57.516Z | Triggered by: pr_updated | Commit: d864582 💡 TIP: You can chat with Visor using |
|
Regarding visor:
|
|



This pull request improves OpenAPI 3.1 (OAS 3.1) support by ensuring that JSON Schema 2020-12 validation is automatically enabled for OAS 3.1+ documents, and adds comprehensive tests for various OAS 3.1 null and nullable type scenarios. It also updates dependencies to use the latest internal fork of
kin-openapiand adds a new version of thejsonschemalibrary.OAS 3.1 Validation Improvements:
Validatemethod inoas.gonow automatically enables JSON Schema 2020-12 validation for OAS 3.1+ documents, ensuring correct validation behavior for new schema features.Enhanced Test Coverage:
oas_31_test.gowith a suite of tests covering OAS 3.1 features, especially handling ofnulltypes and the interplay betweentype: ["null", ...]and the deprecatednullable: truesyntax.oas_test.goto simplify the creation of OAS documents and test scenarios, improving test maintainability and readability.Dependency Updates:
kin-openapidependency to a new internal fork version to support improved OAS 3.1 validation.github.com/santhosh-tekuri/jsonschema/v6as an indirect dependency, preparing for advanced JSON Schema validation features.Ticket Details
TT-16410
Generated at: 2026-01-30 15:31:23