OpenDataServices / standards-lab

Open Standards Lab. A web tool for users and creators of Open Standards.
https://standards-lab.readthedocs.io/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Add "Error on additional fields" option to test function #174

Open odscjames opened 3 years ago

odscjames commented 3 years ago

If you pass a schema thru https://github.com/OpenDataServices/compile-to-json-schema you can select a "Set additional properties false everywhere" option.

This means that any extra fields in your sample data that don't match the schema will raise an error. It ensures your test data is even more correct.

eg Say there is a optional field called "cat" and a bit of sample data mistakedly has a field called "cats" instead - a normal test won't catch that. Turn on this flag, and the tests would catch that.

This use case comes directly from BODS, where they do this on their sample data to make sure the sample data is really correct.