ONSdigital / csvw-check

A CLI to validate CSV-Ws (W3C's CSV on the Web standard).
Apache License 2.0
1 stars 1 forks source link

Check if reference property can be on schema root #36

Closed josepajay closed 1 year ago

josepajay commented 3 years ago

In PropertyChecker in the Properties hashmap there are a number of properties which are not valid at the root level. For instance the reference and columnReference are properties which are only valid on the foreignKey node inside a JSON schema, however the code as it stands appears to say they're valid at the root level.

Should we rewrite the code so that these properties are only shown as valid when they appear on the appropriate parent object?

(Current ruby implementation allows this)

josepajay commented 3 years ago

Rob recommends we try this out with a CSV-W which has properties defined at the wrong level to see if it's a problem or not.