Fix the response format of the /send
endpoint
Fixes https://github.com/matrix-org/matrix-doc/issues/2236
This commit is contained in:
parent
3875d50de8
commit
74b627ac0b
2 changed files with 28 additions and 37 deletions
|
@ -77,43 +77,33 @@ paths:
|
||||||
The result of processing the transaction. The server is to use this response even in
|
The result of processing the transaction. The server is to use this response even in
|
||||||
the event of one or more PDUs failing to be processed.
|
the event of one or more PDUs failing to be processed.
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: object
|
||||||
minItems: 2
|
title: PDU Processing Results
|
||||||
maxItems: 2
|
description: The results for the processing of each PDU in the transaction.
|
||||||
items:
|
properties:
|
||||||
- type: integer
|
pdus:
|
||||||
description: The value ``200``.
|
type: object
|
||||||
example: 200
|
description: |-
|
||||||
- type: object
|
The PDUs from the original transaction. The string key represents the ID of the
|
||||||
title: PDU Processing Results
|
PDU (event) that was processed.
|
||||||
description: The results for the processing of each PDU in the transaction.
|
additionalProperties:
|
||||||
properties:
|
type: object
|
||||||
pdus:
|
title: PDU Processing Result
|
||||||
type: object
|
description: Information about how the PDU was handled.
|
||||||
description: |-
|
properties:
|
||||||
The PDUs from the original transaction. The string key represents the ID of the
|
error:
|
||||||
PDU (event) that was processed.
|
type: string
|
||||||
additionalProperties:
|
description: |-
|
||||||
type: object
|
A human readable description about what went wrong in processing this PDU.
|
||||||
title: PDU Processing Result
|
If no error is present, the PDU can be considered successfully handled.
|
||||||
description: Information about how the PDU was handled.
|
example: "You are not allowed to send a message to this room."
|
||||||
properties:
|
required: ['pdus']
|
||||||
error:
|
|
||||||
type: string
|
|
||||||
description: |-
|
|
||||||
A human readable description about what went wrong in processing this PDU.
|
|
||||||
If no error is present, the PDU can be considered successfully handled.
|
|
||||||
example: "You are not allowed to send a message to this room."
|
|
||||||
required: ['pdus']
|
|
||||||
examples:
|
examples:
|
||||||
application/json: [
|
application/json: {
|
||||||
200,
|
"pdus": {
|
||||||
{
|
"$successful_event:example.org": {},
|
||||||
"pdus": {
|
"$failed_event:example.org": {
|
||||||
"$successful_event:example.org": {},
|
"error": "You are not allowed to send a message to this room."
|
||||||
"$failed_event:example.org": {
|
|
||||||
"error": "You are not allowed to send a message to this room."
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix the response format of the ``/send`` endpoint.
|
Loading…
Add table
Add a link
Reference in a new issue