json-schema
json-schema copied to clipboard
How can I get errors for all instanceLocation?
Let's consider the following schema
{
"$id": "https://example.com/user-data",
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"name": { "type": "string", "default": "Unknown" },
"email": {
"type": "string",
"format": "email",
},
"tags": {
"type": "array",
"minItems": 3,
"items": { "type": "string", "minLength": 2 }
},
"score": { "type": "integer", "minimum": 0 },
"date": { "type": "integer", "format": "unix-time" },
"nospace": {
"pattern": "^\\S*$",
"type": "string"
},
"extra": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": ["name", "email", "tags", "score", "extra"],
}
I am getting errors only for tags property for the following json
{
"name": "Unknown",
"email": "",
"tags": [],
"score": -50,
"extra": 123
}