You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic as the value of minItems inside schema.properties.test is undefined, so when the original object is tested against the generated schema, we have a validation error.
var Validator = require('jsonschema').Validator
const validator = new Validator()
const result = validator.validate(testObj, schema, {throwError: false})
result.errors contains:
[ ValidationError {
property: 'instance.test',
message: 'does not meet minimum length of undefined',
schema:
{ type: 'array',
uniqueItems: undefined,
minItems: undefined,
items: [Object] },
instance: [],
name: 'minItems',
argument: undefined,
stack: 'instance.test does not meet minimum length of undefined' } ]
The text was updated successfully, but these errors were encountered:
This outputs:
This is problematic as the value of
minItems
insideschema.properties.test
is undefined, so when the original object is tested against the generated schema, we have a validation error.result.errors contains:
The text was updated successfully, but these errors were encountered: