Unify v1 and v2 event schemas
parent
d2185d11df
commit
aa4ed10821
@ -1,23 +1,41 @@
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Room Event",
|
||||
"description": "In addition to the Event fields, Room Events MUST have the following additional field.",
|
||||
"description": "In addition to the Event fields, Room Events may have the following additional fields.",
|
||||
"allOf":[{
|
||||
"$ref": "event.json"
|
||||
}],
|
||||
"properties": {
|
||||
"room_id": {
|
||||
"event_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the room associated with this event."
|
||||
"description": "Required. The globally unique event identifier."
|
||||
},
|
||||
"event_id": {
|
||||
"room_id": {
|
||||
"type": "string",
|
||||
"description": "The globally unique event identifier."
|
||||
"description": "Required. The ID of the room associated with this event."
|
||||
},
|
||||
"user_id": {
|
||||
"sender": {
|
||||
"type": "string",
|
||||
"description": "Contains the fully-qualified ID of the user who *sent* this event."
|
||||
"description": "Required. Contains the fully-qualified ID of the user who *sent* this event."
|
||||
},
|
||||
"unsigned": {
|
||||
"type": "object",
|
||||
"description": "Contains optional extra information about the event.",
|
||||
"properties": {
|
||||
"age": {
|
||||
"type": "integer",
|
||||
"description": "The time in milliseconds that has elapsed since the event was sent"
|
||||
},
|
||||
"redacted_because": {
|
||||
"type": "string",
|
||||
"description": "The reason this event was redacted, if it was redacted"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"description": "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["room_id"]
|
||||
"required": ["event_id", "room_id", "sender"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue