Closed
Description
{
"oneOf": [
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"test1": {
"type": "string"
}
},
"required": ["key", "test1"]
},
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"test2": {
"type": "string"
}
},
"required": ["key", "test2"]
}
]
}
This schema will pass for:
{
"test2" : "ok"
}
Because of array_unique() usage in JsonSchema\Constraints\Constraint::getErrors()
.
When the second schema will be checked a list of errors will contain "key" and "test1" errors. During checking will be added another error with "key" required, but array_unique() will erase it, so this schema will pass a criteria in JsonSchema\Constraints\Underfined::validateOfProperties()
as a result.
Metadata
Metadata
Assignees
Labels
No labels