GFDRR / rdl-standard

The Risk Data Library Standard (RDLS) is an open data standard to make it easier to work with disaster and climate risk data. It provides a common description of the data used and produced in risk assessments, including hazard, exposure, vulnerability, and modelled loss, or impact, data.
https://docs.riskdatalibrary.org/
Creative Commons Attribution Share Alike 4.0 International
13 stars 1 forks source link

Tests: Add a test to check that diagram JSON is valid #213

Open duncandewhurst opened 12 months ago

duncandewhurst commented 12 months ago

https://github.com/GFDRR/rdl-standard/pull/212/ adds diagrams which are generated from snippets of RDLS JSON data.

We should add a test to check that the JSON snippets are valid RDLS data and do not contain additional fields.

To do that, the test will need to preprocess the schema in order to:

duncandewhurst commented 11 months ago

Following the changes in https://github.com/GFDRR/rdl-standard/pull/212/commits/f3a9c309a027e024fd6904d11cbf79d751e0d887, we'll also need to relax type validation for the JSON snippets in order to allow empty strings in place of objects and arrays.