I am using this json schema validator: https://www.jsonschemavalidator.net/ to validate some json. It suprised me that it validates the schema even when a property is missing in the json.
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"test": {
"type": "array"
}
}
}
Should validate
{
"test": []
}
Should not validate (but validates!)
{}
Why is this considered valid and how can I validate the json so that the property test must be part of the json?
required. - span