json-gate icon indicating copy to clipboard operation
json-gate copied to clipboard

createSchema should warn about unknown/inactive attributes and types

Open oferei opened this issue 12 years ago • 0 comments

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.

oferei avatar Oct 17 '12 21:10 oferei