spectral icon indicating copy to clipboard operation
spectral copied to clipboard

feat(rulesets): improve OAS 3.1 external references validation

Open fluz opened this issue 4 months ago β€’ 5 comments

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

  • [x] Tests added
  • [x] Docs added

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

fluz avatar Aug 20 '25 15:08 fluz

Hi someone can review my proposal.

TIA

fluz avatar Sep 08 '25 15:09 fluz

Hi Pals,

just a kindly reminder to not forget my PR πŸ™πŸΎ :-)

fluz avatar Sep 22 '25 00:09 fluz

Hi @mnaumanali94 , can you please take a look on this PR when you have time πŸ™πŸΎ :-)

fluz avatar Oct 15 '25 11:10 fluz

@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!

fluz avatar Nov 13 '25 23:11 fluz

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 :)

olvlvl-solaris avatar Dec 04 '25 16:12 olvlvl-solaris

Hi @stoplightio/oss-spectral

Please take a look when it is possible in this PR. πŸ™πŸΎ

Thanks in advance

fluz avatar Dec 12 '25 14:12 fluz