project-open-data / project-open-data.github.io

Open Data Policy — Managing Information as an Asset
https://project-open-data.cio.gov/
Other
1.34k stars 583 forks source link

v1.1 JSON Schema should enforce conditional requirements #434

Open philipashlock opened 9 years ago

philipashlock commented 9 years ago

Currently the v1.1 JSON Schema doesn't enforce some of the more complicated conditional requirements like rights only being required when accessLevel is non-public or restricted public

It is possible to do conditional requirements like this with JSON Schema, but from what I can tell it looks like it would mean duplicating all the other fields on the dataset level. (unless there's some other way to include partial $refs for the object)

See:

philipashlock commented 8 years ago

An interim solution for this would be to add a disclaimer for the JSON Schema and to add manual checks in the validation script on the POD Dashboard

Relequestual commented 2 years ago

This is a lot easier to do with newer versions of JSON Schema. If anyone is interested in driving this issue or wants any help from the JSON Schema team, please let me know. You can find my twitter on my profile, or reach out to us on the JSON Schema slack server.