Please explain as to why this json is not giving validation error against the schema:
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properites": {
"address": {
"type": "array",
"items":{
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"port": {
"type": "integer"
},
"interface": {
"type": "string"
},
"maskLength": {
"type": "integer"
}
},
"required": [
"ip",
"port",
"interface",
"maskLength"
]
}
}
},
"required": [
"address"
]
}
JSON
{
"address": [
{
"ip": 1,
"port": 8305
},
{
"ip": "2405:200:1413:100::5:cc",
"port": "8205",
"interface": "eno1",
"maskLength": 112
},
{
"ip": 2,
"port": 8105,
}
]
}
I'm testing this on https://www.jsonschemavalidator.net/ and it gives validation successful which I don't understand. interface and maskLength are required fields as per the schema and these are missing from some array elements. Also, the type of "ip" is string in schema but in the json, integer type is also being accepted. Why is this json not being rejected?