mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-28 19:48:37 +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.
53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
{
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
"type": "object",
|
|
"title": "AudioMessage",
|
|
"description": "This message represents a single audio clip.",
|
|
"allOf": [{
|
|
"$ref": "core-event-schema/room_event.json"
|
|
}],
|
|
"properties": {
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"msgtype": {
|
|
"type": "string",
|
|
"enum": ["m.audio"]
|
|
},
|
|
"body": {
|
|
"type": "string",
|
|
"description": "A description of the audio e.g. 'Bee Gees - Stayin' Alive', or some kind of content description for accessibility e.g. 'audio attachment'."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "The URL to the audio clip."
|
|
},
|
|
"info": {
|
|
"type": "object",
|
|
"title": "AudioInfo",
|
|
"description": "Metadata for the audio clip referred to in ``url``.",
|
|
"properties": {
|
|
"mimetype": {
|
|
"type": "string",
|
|
"description": "The mimetype of the audio e.g. ``audio/aac``."
|
|
},
|
|
"size": {
|
|
"type": "integer",
|
|
"description": "The size of the audio clip in bytes."
|
|
},
|
|
"duration": {
|
|
"type": "integer",
|
|
"description": "The duration of the audio in milliseconds."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["msgtype", "body", "url"]
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["m.room.message"]
|
|
}
|
|
}
|
|
}
|