json-gate
json-gate copied to clipboard
createSchema should warn about unknown/inactive attributes and types
A few examples:
- attribute with unknown name (ignored completely)
- type with unknown name (treated as 'any')
- properties attribute when type is not 'object'
- additionalItems attribute when items attribute is not an array (tuple typing)
Although this is all "by the book" it may lead to bugs, such as uncaught errors in runtime. Not sure about the API, but perhaps there should be some (opt-in) 'strict' option.