sdmx-twg / sdmx-json

This repository is used for maintaining the SDMX-JSON message specifications.
54 stars 20 forks source link

Schemas are unsuitable for validation purposes #165

Open sosna opened 1 week ago

sosna commented 1 week ago

The SDMX-JSON Schemas seem to be unsuitable for validation purposes. This is because undefined properties are currently allowed. This makes it very hard for implementers to verify that their SDMX-JSON output is in line with the spec.

In order to address this, we could:

stratosn commented 1 week ago

In some cases "additionalProperties": false would also help (it is used only twice in the current schema).

sosna commented 1 week ago

I am no JSON schema expert but additionalProperties did not work in this case. Searching for the reason why led me to a post recommending the use of unevaluatedProperties instead.

Again, just my 2 cents, as I'm no JSON schema expert...

stratosn commented 1 week ago

Indeed, for cases like allOf, anyOf and the likes, the additionalProperties does not work. I am only suggesting that for simple cases, where a list of properties is foreseen, the additionalProperties might do.

(also not a json schema expert - GPT helped a bit ;-) )