mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-31 13:08:38 +01:00
Rename "schema/v1/core" to "schema/v1/core-event-schema". Add self-referential symlinks to schema/v1/core-event-schema The python json schema libraries expect that relative references are relative to the file they are in. The node json schema libraries expect that relateive references are relative to the first file loaded. To support both kinds we reference the core event schema using "core-event-schema/event.json". We then symlink the core-event-schema directory to both the location of the file refering to "event.json" so that it will work in python and to the location of the top level file so that it will work in node.
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
{
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
"type": "object",
|
|
"title": "LocationMessage",
|
|
"description": "This message represents a real-world location.",
|
|
"allOf": [{
|
|
"$ref": "core-event-schema/room_event.json"
|
|
}],
|
|
"properties": {
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"msgtype": {
|
|
"type": "string",
|
|
"enum": ["m.location"]
|
|
},
|
|
"body": {
|
|
"type": "string",
|
|
"description": "A description of the location e.g. 'Big Ben, London, UK', or some kind of content description for accessibility e.g. 'location attachment'."
|
|
},
|
|
"geo_uri": {
|
|
"type": "string",
|
|
"description": "A geo URI representing this location."
|
|
},
|
|
"thumbnail_url": {
|
|
"type": "string",
|
|
"description": "The URL to a thumbnail of the location being represented."
|
|
},
|
|
"thumbnail_info": {
|
|
"type": "object",
|
|
"title": "ImageInfo",
|
|
"allOf": [{
|
|
"$ref": "core-event-schema/msgtype_infos/image_info.json"
|
|
}]
|
|
}
|
|
},
|
|
"required": ["msgtype", "body", "geo_uri"]
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["m.room.message"]
|
|
}
|
|
}
|
|
}
|