Fix OpenAPI components.pathItems refs dropping operations#2292
Merged
joelrosario merged 2 commits intomainfrom Feb 22, 2026
Merged
Fix OpenAPI components.pathItems refs dropping operations#2292joelrosario merged 2 commits intomainfrom
joelrosario merged 2 commits intomainfrom
Conversation
Summary
|
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.
What:
$refvalues that point to#/components/pathItems/*.3.0.1and3.1.0with the samecomponents.pathItemssample shape.Why:
components.pathItemswere failing validation on3.0.1(attribute components.pathItems is unexpected) and operations were being dropped (API Operations: 0) in both3.0.1and3.1.0test scenarios.How:
OpenApiSpecificationthat inlines path-level#/components/pathItems/*refs into concrete path items before parsing.fromYAML(...)andcheckSpecValidity(...).3.0.x, removedcomponents.pathItemsafter inlining to avoid parser warnings about unsupported attributes.Checklist:
Issue ID:
Closes: N/A
Validation:
./gradlew :specmatic-core:test --tests "io.specmatic.conversions.OpenApiSpecificationTest.checkSpecValidity should accept components pathItems references"./gradlew :specmatic-core:test --tests "io.specmatic.conversions.OpenApiSpecificationTest.should pass checkSpecValidity with valid openapi file" --tests "io.specmatic.conversions.OpenApiSpecificationTest.checkSpecValidity should throw ContractException when a valid openapi file gets parsed with issues" --tests "io.specmatic.conversions.OpenApiSpecificationTest.parser errors should be printed as a WARNING statement on the console"