Convert things that mention "Transaction" to swagger
There's two kinds of transactions currently: one with EDUs and one without. The one with EDUs is only used on /send, however the schema is still somewhat worth splitting out for simplicity. The examples are brought apart to make them slightly more reusable for when they get dumped into the relevant sections of the spec (see TODO in server_server_api.rst) Further, the Transactions stuff introduces tuples to the spec. The units.py has been updated to support this.
This commit is contained in:
parent
808a82e811
commit
374ec00046
12 changed files with 485 additions and 54 deletions
8
api/server-server/examples/edu.json
Normal file
8
api/server-server/examples/edu.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"edu_type": "m.presence",
|
||||
"origin": "blue",
|
||||
"destination": "orange",
|
||||
"content": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
6
api/server-server/examples/full_transaction.json
Normal file
6
api/server-server/examples/full_transaction.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"origin": "matrix.org",
|
||||
"origin_server_ts": 1234567890,
|
||||
"pdus": [{"$ref": "pdu.json"}],
|
||||
"edus": [{"$ref": "edu.json"}]
|
||||
}
|
25
api/server-server/examples/pdu.json
Normal file
25
api/server-server/examples/pdu.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"room_id": "!UcYsUzyxTGDxLBEvLy:example.org",
|
||||
"sender": "@alice:example.com",
|
||||
"origin": "example.com",
|
||||
"event_id": "$a4ecee13e2accdadf56c1025:example.com",
|
||||
"origin_server_ts": 1404838188000,
|
||||
"type": "m.room.message",
|
||||
"prev_events": [
|
||||
[
|
||||
"$af232176:example.org",
|
||||
{"sha256": "abase64encodedsha256hashshouldbe43byteslong"}
|
||||
]
|
||||
],
|
||||
"hashes": {
|
||||
"sha256": "thishashcoversallfieldsincasethisisredacted"
|
||||
},
|
||||
"signatures": {
|
||||
"example.com": {
|
||||
"ed25519:key_version:": "these86bytesofbase64signaturecoveressentialfieldsincludinghashessocancheckredactedpdus"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
5
api/server-server/examples/transaction.json
Normal file
5
api/server-server/examples/transaction.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"origin": "matrix.org",
|
||||
"origin_server_ts": 1234567890,
|
||||
"pdus": [{"$ref": "pdu.json"}]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue