-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Validation doesn't work for a schema which combines multiple objects with oneOf or anyOf.
const schema = {
oneOf: [
{
properties: {
foo: {
type: 'string',
},
},
required: ['foo'],
type: 'object',
},
{
properties: {
bar: {
type: 'string',
},
},
required: ['bar'],
type: 'object',
},
],
};
Validating with this schema doesn't display any errors when the input doesn't match:
json-schema-library does return an error but it's being ignored by the validation code because OneOfError is not in positionalErrors and the pointer only has keyFrom/keyTo and not valueFrom/valueTo.
Changing oneOf to anyOf in the schema has the same problem.
Metadata
Metadata
Assignees
Labels
No labels
