open-contracting / standard-maintenance-scripts

Scripts for maintaining all repositories, in particular the standard's documentation and extensions
https://open-contracting.github.io/standard-maintenance-scripts/
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

test_json.py: Validate JSON files against JSON Schema #7

Open jpmckinney opened 7 years ago

jpmckinney commented 7 years ago

2019 update: Running the following on each of the standard, profile, extension repos:

find . -name '*.json' -not -name 'extension.json' -not -name '*-schema.json' -not -path '*metaschema*' -not -path '*/_static/docson/*'

Only these have OCDS JSON files:


Off the top of my head, we'd need to:

Bjwebb commented 7 years ago

Note that the python jsonschema library doesn't check formats by default, you need to set it up explicitly https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats

jpmckinney commented 5 years ago

Can re-use / replace this test once done: https://github.com/open-contracting/sample-data/blob/master/tests/test_fictional_example.py

jpmckinney commented 4 years ago

The standard repo now has a lot of JSON files for worked examples, so this is no longer low priority.