{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "v": { "type": "number", "const": 0, "description": "The version of the Event Data schema" }, "id": { "type": "string" }, "name": { "description": "The name of the event", "$ref": "#/$defs/Translations" }, "label": { "description": "!unstable(#9)", "$ref": "#/$defs/Translations" }, "description": { "description": "A short description of the event", "$ref": "#/$defs/Translations" }, "status": { "description": "The status of the event", "$ref": "#/$defs/EventStatus" }, "venues": { "description": "The venues associated with this event", "type": "array", "items": { "$ref": "#/$defs/Venue" } }, "instances": { "description": "The instances of the event", "type": "array", "items": { "$ref": "#/$defs/EventInstance" } }, "components": { "description": "Additional components of the event", "type": "array", "items": { "$ref": "#/$defs/EventComponent" } } }, "required": [ "v", "name" ], "additionalProperties": false, "id": "EventData", "title": "Event Data", "description": "An event", "$id": "https://raw.githubusercontent.com/deniz-blue/events-format/refs/heads/main/event-data.schema.json", "$defs": { "Translations": { "type": "object", "propertyNames": { "type": "string", "description": "BCP37 or ISO 639-1 language code" }, "additionalProperties": { "type": "string" }, "id": "Translations", "description": "A multilingual string", "default": { "en": "" }, "examples": [ { "en": "Example", "tr": "Örnek", "lt": "Pavyzdys" } ], "defaultSnippets": [ { "label": "Add English", "body": { "en": "$1" } }, { "label": "Add other language", "body": { "$1": "$2" } } ] }, "EventStatus": { "anyOf": [ { "type": "string", "const": "planned", "description": "No disruptions - event is planned or has already occurred" }, { "type": "string", "const": "uncertain", "description": "Event is not finalized" }, { "type": "string", "const": "postponed", "description": "The event has been postponed to an unknown later date" }, { "type": "string", "const": "cancelled", "description": "The event has been cancelled" }, { "type": "string", "const": "suspended", "description": "The event may be postponed or cancelled" } ], "id": "EventStatus" }, "Venue": { "id": "Venue", "oneOf": [ { "$ref": "#/$defs/PhysicalVenue" }, { "$ref": "#/$defs/OnlineVenue" }, { "$ref": "#/$defs/UnknownVenue" } ] }, "PhysicalVenue": { "type": "object", "properties": { "type": { "type": "string", "const": "physical" }, "id": { "type": "string", "description": "ID of the venue to be used in Event Instances" }, "name": { "description": "The name of the venue", "$ref": "#/$defs/Translations" }, "address": { "$ref": "#/$defs/Address" }, "coordinates": { "description": "Approximate coordinates", "$ref": "#/$defs/LatLng" }, "googleMapsPlaceId": { "type": "string" } }, "required": [ "type", "id", "name" ], "additionalProperties": false, "id": "PhysicalVenue", "title": "Physical Venue", "description": "A venue with a known or unknown physical location" }, "Address": { "type": "object", "properties": { "countryCode": { "description": "The ISO 3166-1 alpha-2 country code", "type": "string" }, "postalCode": { "description": "The postal code of the address, if any", "type": "string" }, "addr": { "description": "Full address excluding country and postal code", "type": "string" } }, "additionalProperties": false, "id": "Address" }, "LatLng": { "type": "object", "properties": { "lat": { "type": "number", "title": "Latitude" }, "lng": { "type": "number", "title": "Longitude" } }, "required": [ "lat", "lng" ], "additionalProperties": false, "id": "LatLng" }, "OnlineVenue": { "type": "object", "properties": { "type": { "type": "string", "const": "online" }, "id": { "type": "string", "description": "ID of the venue to be used in Event Instances" }, "name": { "description": "The name of the venue", "$ref": "#/$defs/Translations" }, "url": { "type": "string" } }, "required": [ "type", "id", "name" ], "additionalProperties": false, "id": "OnlineVenue" }, "UnknownVenue": { "type": "object", "properties": { "type": { "type": "string", "const": "unknown" }, "id": { "type": "string", "description": "ID of the venue to be used in Event Instances" }, "name": { "description": "The name of the venue", "$ref": "#/$defs/Translations" } }, "required": [ "type", "id", "name" ], "additionalProperties": false, "id": "UnknownVenue" }, "EventInstance": { "type": "object", "properties": { "id": { "type": "string" }, "venueIds": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the venues where this event instance takes place" }, "start": { "description": "The start date and/or time", "$ref": "#/$defs/PartialDate" }, "end": { "description": "The end date and/or time", "$ref": "#/$defs/PartialDate" }, "status": { "description": "The status of the event instance", "$ref": "#/$defs/EventStatus" } }, "required": [ "venueIds" ], "additionalProperties": false, "id": "EventInstance", "title": "Event Instance", "description": "A part of an event that can occur at a known or unknown date and/or time and a known or unknown place or places." }, "PartialDate": { "type": "string", "id": "PartialDate", "description": "An ISO 8601 date and time string that may be incomplete (e.g. '2023', '2023-05') and does not include timezone information (forced UTC)", "regex": "^\\d{4}(-\\d{2}(-\\d{2}(T\\d{2}:\\d{2})?)?)?$", "examples": [ "2023", "2023-05", "2023-05-15", "2023-05-15T13:45" ], "defaultSnippets": [ { "label": "Current Date&Time", "body": "${1:${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}}" } ] }, "EventComponent": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "link" }, "data": { "$ref": "#/$defs/LinkComponent" } }, "required": [ "type", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "source" }, "data": { "$ref": "#/$defs/SourceComponent" } }, "required": [ "type", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "splashMedia" }, "data": { "type": "object", "properties": { "roles": { "type": "array", "items": { "type": "string" } }, "media": { "$ref": "#/$defs/Media" } }, "required": [ "roles", "media" ], "additionalProperties": false } }, "required": [ "type", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "not": { "anyOf": [ { "const": "link" }, { "const": "source" }, { "const": "splashMedia" } ] } }, "data": { "type": "object" } }, "required": [ "type", "data" ], "additionalProperties": false } ], "id": "EventComponent" }, "LinkComponent": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the link" }, "name": { "description": "The name of the link", "$ref": "#/$defs/Translations" }, "description": { "description": "A description of the link", "$ref": "#/$defs/Translations" }, "disabled": { "description": "Whether the link is disabled", "type": "boolean" }, "opensAt": { "description": "The date and/or time when the link becomes active", "$ref": "#/$defs/PartialDate" }, "closesAt": { "description": "The date and/or time when the link becomes inactive", "$ref": "#/$defs/PartialDate" } }, "required": [ "url" ], "additionalProperties": false, "id": "LinkComponent" }, "SourceComponent": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the source" } }, "required": [ "url" ], "additionalProperties": false, "id": "SourceComponent", "description": "A source of information about the event, such as a news article, a social media post, an official announcement etc." }, "Media": { "type": "object", "properties": { "sources": { "minItems": 1, "type": "array", "items": { "$ref": "#/$defs/MediaSource" }, "description": "The sources for the media item" }, "alt": { "description": "Alternative text for the media item", "$ref": "#/$defs/Translations" }, "presentation": { "description": "The presentation details of the media item", "$ref": "#/$defs/MediaPresentation" } }, "required": [ "sources" ], "additionalProperties": false, "id": "Media", "title": "Media", "description": "A media item, such as an image or video" }, "MediaSource": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "The URL of the media source" }, "dimensions": { "description": "The dimensions of the media in pixels", "$ref": "#/$defs/MediaDimensions" }, "mimeType": { "description": "The MIME type of the media", "type": "string" } }, "required": [ "url" ], "additionalProperties": false, "id": "MediaSource", "title": "Media Source", "description": "A source for a media item." }, "MediaDimensions": { "type": "object", "properties": { "width": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "The width of the media in pixels" }, "height": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "The height of the media in pixels" } }, "required": [ "width", "height" ], "additionalProperties": false, "id": "MediaDimensions", "title": "Media Dimensions", "description": "The dimensions of a media item" }, "MediaPresentation": { "type": "object", "properties": { "blurhash": { "description": " A BlurHash representation of the media item", "type": "string" }, "dominantColor": { "description": "The dominant color of the media item in hex rgb format (must start with a hashtag)", "type": "string" } }, "additionalProperties": false, "id": "MediaPresentation", "title": "Media Presentation", "description": "The presentation details of a media item" } } }