imperialCHEPI / healthgps

Global Health Policy Simulation model (Health-GPS)
https://imperialchepi.github.io/healthgps/
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Forbid additional properties in data index files #486

Closed alexdewar closed 2 weeks ago

alexdewar commented 1 month ago

See: https://github.com/imperialCHEPI/healthgps/pull/404

I initially tried setting additionalProperties to false everywhere in the schema, but it broke validation so I didn't bother. I should have opened an issue at the time though, because we do also want to prevent users from adding additional properties (at least most of the time). In part this just makes the files cleaner, but it also prevents users from changing non-existent properties that won't actually do anything (including if they misspell the name of an actual property).

jamesturner246 commented 1 month ago

but it also prevents users from changing non-existent properties that won't actually do anything (including if they misspell the name of an actual property).

Precisely the cause of the last fiasco. We probably want to be as pedantic as we can get away with here. :+1:

alexdewar commented 1 month ago

Oh dear. Was that with the static data or the config files?

jamesturner246 commented 1 month ago

That was the static relative disease risk files, in that case.