json-schema-org / JSON-Schema-Test-Suite

A language agnostic test suite for the JSON Schema specifications
MIT License
625 stars 209 forks source link

Added tests to encoded refs to unknown keywords. #683

Open mwadams opened 1 year ago

mwadams commented 1 year ago

An issue was opened against my json-schema implementation https://github.com/corvus-dotnet/Corvus.JsonSchema/issues/238

This turned out to be an implementation-specific bug that related to the handling of references to non-keyword schema islands.

While this is very much an "implementation specific" issue, it is similar to the existing refOfUnknownKeyword tests, and catches a case that is not otherwise validated, but is common in e.g. OpenAPI.

The Slack discussion is to be found:

https://json-schema.slack.com/archives/C8CQ81GKF/p1690501470341369

This PR adds tests to the existing optional/refOfUnknownKeyword.json tests in draft2020-12, draft2019-09 and draft-next.

mwadams commented 1 year ago

These specs pass against my implementation for 2019-09 and 2020-12.

I am not yet running against draft-next

image image

mwadams commented 6 months ago

Apologies! For some reason I didn't get a notification about this. I'll action it now.

karenetheridge commented 6 months ago

Surely rebasing would fix that?