Conversation
Process OAS 3.1 combinators through the base Schema model and recursively resolve schema-valued keywords, including nested items, additionalProperties, not, if/then/else, contains, prefixItems, propertyNames, and dependentSchemas. Preserve existing OAS 3.0 combinator behavior and add regression coverage for request and response schemas, nested combinators, references, and mixed array/object keywords. Document the parsed-input limitation for additionalItems and the existing limitations of combinator aggregation.
2 tasks
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.
Description
ResolverFullycurrently relies on OAS 3.0 shape-specific schema subclasses such asComposedSchema,ArraySchema, andMapSchema. OAS 3.1 schemas are deserialized asJsonSchema, so combinators and nested schema-valued keywords can be skipped during resolution.This PR:
allOf,oneOf, andanyOfthrough the baseSchemamodel so they also work for OAS 3.1.itemsadditionalPropertiesprefixItemspatternPropertiescontainscontentSchemapropertyNamesunevaluatedPropertiesunevaluatedItemsif,then, andelsedependentSchemasnottraversal for both OAS 3.0 and OAS 3.1.JsonSchema.The implementation intentionally keeps the change surface as small as possible. The dereferencing logic can be simplified and refactored in a follow-up phase now that OAS 3.1 schema handling is covered explicitly.
Regression tests cover request-body and response schemas, nested combinators, references, OAS 3.0 compatibility, and schemas containing both array- and object-specific keywords.
Known limitations are clearly identified and can be continuously mitigated through future changes. In particular, combinator aggregation retains an existing limitation: flattening arbitrary combinators into a new schema is not fully lossless and may drop sibling constraints or alter
oneOf/anyOfsemantics. This limitation is documented for follow-up work. ParsedadditionalItemsis also documented separately because the current deserializer stores it as an extension rather than populatingSchema.additionalItems.Fixes issue #2403.
Type of Change
Checklist