{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [ "contactType", "contact" ],
"properties": {
"contactType": {
"oneOf": [
{ "const": "authenticated" },
{ "const": "userInput" }
]
},
"contact": { "$ref": "#/definitions/Contact" },
"location": { "$ref": "#/definitions/Location" }
},
"definitions": {
"Contact": {
"type": "object",
"required": [ "firstname", "lastname" ],
"properties": {
"firstname": { "type": "string" },
"lastname": { "type": "string" },
"rrn": { "type": "number" },
"address": { "$ref": "#/definitions/Address" },
"email": { "type": "string" },
"phone": { "type": "string" }
}
},
"Address": {
"type": "object",
"required": [ "street", "number", "city" ],
"properties": {
"street": { "type": "string" },
"number": { "type": "string" },
"box": { "type": "string" },
"zipcode": { "type": "string" },
"city": { "type": "string" }
}
},
"Location": {
"type": "object",
"properties": {
"address": { "$ref": "#/definitions/Address" },
"coordinates": { "$ref": "#/definitions/Coordinates" }
}
},
"Coordinates": {
"type": "object",
"properties": {
"longlng": {
"type": "number",
"format": "double"
},
"lat": {
"type": "number",
"format": "double"
},
"accuracy": {
"type": "number",
"format": "double"
}
}
}
}
} |