Skip to content

Conversation

@fluz
Copy link

@fluz fluz commented Aug 20, 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 external references test scenario in test-harness
  • Update Arazzo schema validators to use improved OAS 3.1 schema
  • Enhance OAS 3 schema test coverage

Fixes #2655

Checklist

  • Tests added
  • Docs added

Does this PR introduce a breaking change?

  • Yes
  • No

@fluz fluz marked this pull request as ready for review August 20, 2025 15:13
@fluz fluz requested a review from a team as a code owner August 20, 2025 15:13
@fluz fluz marked this pull request as draft August 20, 2025 15:13
- Update OAS 3.1 schema to better support external references
- Add external references test scenario in test-harness
- Update Arazzo schema validators to use improved OAS 3.1 schema
- Enhance OAS 3 schema test coverage

Fixes issues with external reference validation in OpenAPI 3.1 documents.
@fluz fluz force-pushed the fix/oas31-external-ref-validation branch from a7c06e7 to fde1451 Compare August 20, 2025 15:23
@fluz fluz marked this pull request as ready for review August 20, 2025 15:27
@fluz
Copy link
Author

fluz commented Sep 8, 2025

Hi someone can review my proposal.

TIA

@fluz
Copy link
Author

fluz commented Sep 22, 2025

Hi Pals,

just a kindly reminder to not forget my PR 🙏🏾 :-)

@fluz
Copy link
Author

fluz commented Oct 15, 2025

Hi @mnaumanali94 , can you please take a look on this PR when you have time 🙏🏾 :-)

@fluz
Copy link
Author

fluz commented Nov 13, 2025

@bcoughlan @frankkilcommins

Could you please take a look at my PR? 🙏🏾
Btw, the code isn’t passing at the moment because I just merged the develop branch into my branch. Previously was everything right :-)

Thanks!

@olvlvl-solaris
Copy link

Thank you @fluz for providing a fix for this issue. The $ref keyword is indeed allowed for Path Item Object as stated in the following document: https://learn.openapis.org/referencing/overview.html#a-taxonomy-of-references. Maybe your fix will be merged just in time for Xmas :)

@fluz
Copy link
Author

fluz commented Dec 12, 2025

Hi @stoplightio/oss-spectral

Please take a look when it is possible in this PR. 🙏🏾

Thanks in advance

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

2 participants