mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-25 10:33:18 +01:00
SchemaValidator not returning correct invalid additionalProperties
This commit is contained in:
parent
246cd09118
commit
5eb8e3f12a
@ -157,8 +157,9 @@ class SchemaValidator implements ValidatorInterface
|
||||
}
|
||||
} else {
|
||||
// if additionalProperties is set to false and there are additionalProperties in the values, then fail
|
||||
$keys = array_keys($value);
|
||||
$this->errors[] = sprintf('%s[%s] is not an allowed property', $path, reset($keys));
|
||||
foreach ($diff as $prop) {
|
||||
$this->errors[] = sprintf('%s[%s] is not an allowed property', $path, $prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user