Move raw API and event schemas into /data directory
Historical note: this was originally a series of several commits, spread out over several weeks. They have been squashed together to make `git annotate` work properly. The original commits were: * 91ab3934 <Will> 2021-01-25 21:16:42 -0800 Add raw API end event schemas into /data directory * aae22f47 <Will> 2021-01-25 21:33:06 -0800 Remove non-data files * 1092d4ca <Will> 2021-01-26 20:41:33 -0800 Add data-compatiuble extension (.yaml) to all data files that currently omit one * 21060109 <Will> 2021-01-26 20:57:28 -0800 Remove symlink to event-schemas, and update openAPI schema paths accordingly * 4f633845 <Travis Ralston> 2021-04-12 21:54:54 -0600 Fix event schema examples too * 301c7b2f <Will> 2021-02-05 10:15:42 -0800 Restore docs describing OpenAPI extensions that we use
This commit is contained in:
parent
a26c352d78
commit
00c6a866e2
327 changed files with 82 additions and 10822 deletions
6
data/api/server-server/examples/edu.json
Normal file
6
data/api/server-server/examples/edu.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"edu_type": "m.presence",
|
||||
"content": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
7
data/api/server-server/examples/minimal_pdu.json
Normal file
7
data/api/server-server/examples/minimal_pdu.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "m.room.minimal_pdu",
|
||||
"room_id": "!somewhere:example.org",
|
||||
"content": {
|
||||
"see_room_version_spec": "The event format changes depending on the room version."
|
||||
}
|
||||
}
|
11
data/api/server-server/examples/pdu.json
Normal file
11
data/api/server-server/examples/pdu.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$ref": "unsigned_pdu.json",
|
||||
"hashes": {
|
||||
"sha256": "thishashcoversallfieldsincasethisisredacted"
|
||||
},
|
||||
"signatures": {
|
||||
"example.com": {
|
||||
"ed25519:key_version:": "these86bytesofbase64signaturecoveressentialfieldsincludinghashessocancheckredactedpdus"
|
||||
}
|
||||
}
|
||||
}
|
20
data/api/server-server/examples/pdu_v3.json
Normal file
20
data/api/server-server/examples/pdu_v3.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$ref": "unsigned_pdu_base.json",
|
||||
"hashes": {
|
||||
"sha256": "thishashcoversallfieldsincasethisisredacted"
|
||||
},
|
||||
"signatures": {
|
||||
"example.com": {
|
||||
"ed25519:key_version:": "these86bytesofbase64signaturecoveressentialfieldsincludinghashessocancheckredactedpdus"
|
||||
}
|
||||
},
|
||||
"auth_events": [
|
||||
"$base64encodedeventid",
|
||||
"$adifferenteventid"
|
||||
],
|
||||
"prev_events": [
|
||||
"$base64encodedeventid",
|
||||
"$adifferenteventid"
|
||||
],
|
||||
"redacts": "$some/old+event"
|
||||
}
|
12
data/api/server-server/examples/pdu_v4.json
Normal file
12
data/api/server-server/examples/pdu_v4.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$ref": "pdu_v3.json",
|
||||
"auth_events": [
|
||||
"$urlsafe_base64_encoded_eventid",
|
||||
"$a-different-event-id"
|
||||
],
|
||||
"prev_events": [
|
||||
"$urlsafe_base64_encoded_eventid",
|
||||
"$a-different-event-id"
|
||||
],
|
||||
"redacts": "$some-old_event"
|
||||
}
|
20
data/api/server-server/examples/server_key.json
Normal file
20
data/api/server-server/examples/server_key.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"server_name": "example.org",
|
||||
"verify_keys": {
|
||||
"ed25519:abc123": {
|
||||
"key": "VGhpcyBzaG91bGQgYmUgYSByZWFsIGVkMjU1MTkgcGF5bG9hZA"
|
||||
}
|
||||
},
|
||||
"old_verify_keys": {
|
||||
"ed25519:0ldk3y": {
|
||||
"expired_ts": 1532645052628,
|
||||
"key": "VGhpcyBzaG91bGQgYmUgeW91ciBvbGQga2V5J3MgZWQyNTUxOSBwYXlsb2FkLg"
|
||||
}
|
||||
},
|
||||
"signatures": {
|
||||
"example.org": {
|
||||
"ed25519:auto2": "VGhpcyBzaG91bGQgYWN0dWFsbHkgYmUgYSBzaWduYXR1cmU"
|
||||
}
|
||||
},
|
||||
"valid_until_ts": 1652262000000
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$ref": "server_key.json",
|
||||
"signatures": {
|
||||
"example.org": {
|
||||
"ed25519:abc123": "VGhpcyBzaG91bGQgYWN0dWFsbHkgYmUgYSBzaWduYXR1cmU"
|
||||
},
|
||||
"notary.server.com": {
|
||||
"ed25519:010203": "VGhpcyBpcyBhbm90aGVyIHNpZ25hdHVyZQ"
|
||||
}
|
||||
}
|
||||
}
|
7
data/api/server-server/examples/transaction.json
Normal file
7
data/api/server-server/examples/transaction.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"origin": "matrix.org",
|
||||
"origin_server_ts": 1234567890,
|
||||
"pdus": [{
|
||||
"$ref": "minimal_pdu.json"
|
||||
}]
|
||||
}
|
4
data/api/server-server/examples/unsigned_pdu.json
Normal file
4
data/api/server-server/examples/unsigned_pdu.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$ref": "unsigned_pdu_base.json",
|
||||
"event_id": "$a4ecee13e2accdadf56c1025:example.com"
|
||||
}
|
26
data/api/server-server/examples/unsigned_pdu_base.json
Normal file
26
data/api/server-server/examples/unsigned_pdu_base.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"room_id": "!UcYsUzyxTGDxLBEvLy:example.org",
|
||||
"sender": "@alice:example.com",
|
||||
"origin": "example.com",
|
||||
"origin_server_ts": 1404838188000,
|
||||
"depth": 12,
|
||||
"auth_events": [
|
||||
[
|
||||
"$af232176:example.org",
|
||||
{"sha256": "abase64encodedsha256hashshouldbe43byteslong"}
|
||||
]
|
||||
],
|
||||
"type": "m.room.message",
|
||||
"prev_events": [
|
||||
[
|
||||
"$af232176:example.org",
|
||||
{"sha256": "abase64encodedsha256hashshouldbe43byteslong"}
|
||||
]
|
||||
],
|
||||
"content": {
|
||||
"key": "value"
|
||||
},
|
||||
"unsigned": {
|
||||
"age": 4612
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue