Open furstenheim opened 4 years ago
In an array of items in the array, required is set even if it is not true.
> const jsonSchemaGenerator = require('json-schema-generator') undefined > jsonSchemaGenerator([{a: 1, b: 2}, {a: 2, b: 3}, {b: 5}]) { type: 'array', '$schema': 'http://json-schema.org/draft-04/schema#', description: '', minItems: 1, uniqueItems: true, items: { type: 'object', required: [ 'a', 'b' ], properties: { a: [Object], b: [Object] } } } >
In the previous example a cannot be required since it does not exist in the third element
a
In an array of items in the array, required is set even if it is not true.
In the previous example
a
cannot be required since it does not exist in the third element