mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
Update 'required' constraint to match v7 tests
This commit is contained in:
parent
98d804a367
commit
5430e79754
@ -1013,11 +1013,7 @@ public:
|
||||
virtual bool visit(const RequiredConstraint &constraint)
|
||||
{
|
||||
if ((strictTypes && !target.isObject()) || !target.maybeObject()) {
|
||||
if (results) {
|
||||
results->pushError(context,
|
||||
"Object required to validate 'required' properties.");
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool validated = true;
|
||||
|
@ -554,7 +554,10 @@ TEST_F(TestValidator, Draft7_Properties)
|
||||
|
||||
// TODO: broken refRemote
|
||||
|
||||
// TODO: broken required
|
||||
TEST_F(TestValidator, Draft7_Required)
|
||||
{
|
||||
processDraft7TestFile(TEST_SUITE_DIR "draft7/required.json");
|
||||
}
|
||||
|
||||
TEST_F(TestValidator, Draft7_Type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user