Merge pull request #2560 from matrix-org/travis/clarify-txn-send

Fix the response format of the `/send` endpoint
pull/2569/head
Travis Ralston 4 years ago committed by GitHub
commit ab62b6293c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save