Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

JSON Schema $ref use issue #655

Open
Relequestual opened this issue Oct 22, 2021 · 0 comments
Open

JSON Schema $ref use issue #655

Relequestual opened this issue Oct 22, 2021 · 0 comments

Comments

@Relequestual
Copy link

I raised this same issue at GSA/project-open-data-dashboard#366 but thought it might be worth cross referencing, as you seem to use the same JSON Schemas for validation.

Regarding the catalogue schema...

The JSON Schema uses "draft-04".
In draft-04, when $ref is used, all other keywords MUST ("SHALL") be ignored.

https://datatracker.ietf.org/doc/html/draft-pbryan-zyp-json-ref-03#section-3

Any members other than "$ref" in a JSON Reference object SHALL be
ignored.

We (JSON Schema) later bundled the separate JSON Ref specification into the JSON Schema specification.

As of draft 2019-09, $ref can be used alongside other keywords without this adverse effect, however this schema and many others in this repo use draft-04, and so may have instances validate successfully unexpectidly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant