Closed
Description
When an array has the "maxItems" set. The validation error message fails to display the maxItems value.
try
{
String schemaString = "{\"type\": \"object\", \"properties\": {\"foo\": {\"type\": \"array\", \"maxItems\": 1, \"items\": {\"type\": \"string\"}}}}";
Schema schema = SchemaLoader.load(new JSONObject(schemaString));
schema.validate(new JSONObject("{\"foo\": [\"\", \"\"]}"));
} catch (ValidationException e)
{
System.out.println(e.getMessage());
}
The error message:
#/foo: expected maximum item count: null, found: 2
The "null" should be 1 in this example.
Metadata
Metadata
Assignees
Labels
No labels