Skip to content

Commit fba1e9b

Browse files
authored
Merge pull request #112 from c14s/master
AnyOfValidator: only return expectedTypeList if not empty
2 parents 1071a9f + 7294ea4 commit fba1e9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/networknt/schema/AnyOfValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public Set<ValidationMessage> validate(JsonNode node, JsonNode rootNode, String
6363
}
6464
allErrors.addAll(errors);
6565
}
66-
if (!schemas.isEmpty()) {
66+
if (!expectedTypeList.isEmpty()) {
6767
return Collections.singleton(buildValidationMessage(at, StringUtils.join(expectedTypeList)));
6868
}
6969
return Collections.unmodifiableSet(allErrors);

0 commit comments

Comments
 (0)