Skip to content

fix(rulesets): allow external references in OAS 3.1 paths#2843

Closed
fluz wants to merge 2 commits intostoplightio:developfrom
fluz:fix/oas31-external-references-validation
Closed

fix(rulesets): allow external references in OAS 3.1 paths#2843
fluz wants to merge 2 commits intostoplightio:developfrom
fluz:fix/oas31-external-references-validation

Conversation

@fluz
Copy link

@fluz fluz commented Aug 19, 2025

Fix schema validation error where path items were incorrectly flagged as having unevaluated properties. Changed paths pattern properties to use path-item-or-reference instead of path-item to support external references in OpenAPI 3.1 specifications properly.

Fixes the issue where documents like:

paths:
  /greetings:
    $ref: 'greetings.yaml'

Would generate: "~1greetings" property must not have unevaluated properties.

  • Update OAS 3.1 schema to use path-item-or-reference for paths
  • Add test case for external references validation
  • Add test harness scenario for CLI integration testing

Fixes #2655

Checklist

  • Tests added
  • Docs added

Does this PR introduce a breaking change?

  • Yes
  • No

@fluz fluz requested a review from a team as a code owner August 19, 2025 15:44
@fluz fluz force-pushed the fix/oas31-external-references-validation branch from 942f0dd to 907cd84 Compare August 19, 2025 16:05
Fix schema validation error where path items with  were incorrectly
flagged as having unevaluated properties. Changed paths pattern properties
to use path-item-or-reference instead of path-item to properly support
external references in OpenAPI 3.1 specifications.

Fixes issue where documents like:
paths:
  /greetings:
    $ref: 'greetings.yaml'

Would generate: "~1greetings" property must not have unevaluated properties.

- Update OAS 3.1 schema to use path-item-or-reference for paths
- Add test case for external references validation
- Add test harness scenario for CLI integration testing
@fluz fluz force-pushed the fix/oas31-external-references-validation branch from 907cd84 to 85a7304 Compare August 19, 2025 16:21
@fluz fluz marked this pull request as draft August 20, 2025 08:09
@fluz fluz force-pushed the fix/oas31-external-references-validation branch from d030689 to b6caa7c Compare August 20, 2025 14:23
@fluz
Copy link
Author

fluz commented Aug 20, 2025

I attempted to resolve this MR, but I was unable to update the CircleCI pipeline. I moved the content of this PR to 2844.

@fluz fluz closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spectral-rulesets 1.19.0 breaks path $ref behavior

1 participant