-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Description
With a schema validator which also validates the schema itself when compiling for all rules to be in non-conflict:
require('@exodus/schemasafe').validator(require('../../doc/node-config-schema.json'))
Same but also enforcing that every property is validated:
require('@exodus/schemasafe').validator(require('../../doc/node-config-schema.json'), { mode: 'strong' })
Even the first one fails
Example:
node/doc/node-config-schema.json
Lines 26 to 30 in e67848a
| "items": { | |
| "type": "string", | |
| "minItems": 1 | |
| }, | |
| "type": "array" |
minItems is not a property of type: 'string' schema, it should have been on type: 'array' level
It crashes strict validators and is silently ignored in loose validators otherwise.
There seems to be many instances of that
also perhaps add a validator to lint that