From 5eb8e3f12a7cc200686a0daca5aaca452983c86c Mon Sep 17 00:00:00 2001 From: David Jellesma Date: Sat, 8 Feb 2014 03:56:53 -0500 Subject: [PATCH] SchemaValidator not returning correct invalid additionalProperties --- src/Guzzle/Service/Description/SchemaValidator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Guzzle/Service/Description/SchemaValidator.php b/src/Guzzle/Service/Description/SchemaValidator.php index 13b99cdf..b045422d 100644 --- a/src/Guzzle/Service/Description/SchemaValidator.php +++ b/src/Guzzle/Service/Description/SchemaValidator.php @@ -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); + } } } }