Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant