GSA / project-open-data-dashboard

Project Open Data Dashboard
http://labs.data.gov/dashboard/
Other
138 stars 119 forks source link

JSON Schema $ref use issue #366

Closed Relequestual closed 2 years ago

Relequestual commented 2 years ago

The below extract is from a JSON Schema in this repo.

https://github.com/GSA/project-open-data-dashboard/blob/acfb0528ee4c8094063edbf32dd411268c32a8a3/schema/catalog.json#L7-L11

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.

mogul commented 2 years ago

Thanks so much for reaching out to us! As it turns out, we're on the cusp of replacing this dashboard with reporting that's more native to CKAN, so we won't be fixing this issue here.