mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-01-07 09:48:05 +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)
|
virtual bool visit(const RequiredConstraint &constraint)
|
||||||
{
|
{
|
||||||
if ((strictTypes && !target.isObject()) || !target.maybeObject()) {
|
if ((strictTypes && !target.isObject()) || !target.maybeObject()) {
|
||||||
if (results) {
|
return true;
|
||||||
results->pushError(context,
|
|
||||||
"Object required to validate 'required' properties.");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool validated = true;
|
bool validated = true;
|
||||||
|
@ -554,7 +554,10 @@ TEST_F(TestValidator, Draft7_Properties)
|
|||||||
|
|
||||||
// TODO: broken refRemote
|
// TODO: broken refRemote
|
||||||
|
|
||||||
// TODO: broken required
|
TEST_F(TestValidator, Draft7_Required)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/required.json");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft7_Type)
|
TEST_F(TestValidator, Draft7_Type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user