{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {},
"title": "Event Venue component",
"description": "Validate event venue component schema",
"type": "object",
"additionalProperties": false,
"properties": {
"venueType": {
"type": "array",
"minItems": 1,
"maxItems": 2,
"items": {
"type": "string",
"enum": [
"physical",
"online"
]
}
},
"title": {
"type": "string",
"maxLength": 50,
"description": "Event Title."
},
"address": {
"type": "string",
"minLength": 5,
"maxLength": 1000
},
"hasMapLocation": {
"type": "boolean",
"default": false,
"description": "Whether location has to be shown on google map"
},
"location": {
"$ref": "_base_map.json#/properties/location"
},
"joinButton": {
"$ref": "button.json"
},
"joiningPhoneNumbers": {
"type": "array",
"description": "Phone number to join events.",
"maxItems": 10,
"$comment": "Allow up to 10 numbers.",
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"phoneNumber"
],
"additionalProperties": false,
"properties": {
"phoneNumber": {
"type": "string",
"maxLength": 30,
"pattern": "^(\\d{1,20})$|^((\\+\\d{1,3}([- ])?\\(?\\d\\)?([- ])?\\d{1,5})|(\\(?\\d{2,6}\\)?))([- ])?(\\d{3,4})([- ])?(\\d{4})([- ])?((x|ext|;)([- ])?\\d{1,5})?$"
},
"label": {
"type": "string"
}
}
}
},
"joiningPassword": {
"type": "string",
"description": "Joining password",
"maxLength": 400
},
"eventNotes": {
"type": "string",
"maxLength": 1000,
"description": "Event Notes."
},
"formatting": {
"type": "object",
"additionalProperties": false,
"properties": {
"textStyle": {
"$ref": "style/text.json"
},
"cardStyle": {
"$ref": "style/card.json"
},
"iconStyle": {
"$ref": "style/icon.json"
}
}
}
},
"oneOf": [
{
"properties": {
"venueType": {
"const": [
"physical"
]
}
},
"required": [
"address"
]
},
{
"properties": {
"venueType": {
"const": [
"online"
]
}
},
"required": [
"joinButton"
]
},
{
"properties": {
"venueType": {
"const": [
"physical",
"online"
]
}
},
"required": [
"address",
"joinButton"
]
},
{
"properties": {
"venueType": {
"const": [
"online",
"physical"
]
}
},
"required": [
"address",
"joinButton"
]
}
]
}