mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
api docs: Document the GET /messages/<message_id> endpoint.
This commit is contained in:
committed by
Tim Abbott
parent
ab164ba740
commit
9575f1b51f
@@ -249,33 +249,6 @@ paths:
|
||||
$ref: '#/definitions/MessageResponse'
|
||||
|
||||
/messages/{message_id}:
|
||||
get:
|
||||
description: Retrieve the content of a message.
|
||||
parameters:
|
||||
- name: message_id
|
||||
in: path
|
||||
description: ID of the message to be retrieved.
|
||||
type: integer
|
||||
required: true
|
||||
security:
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success.
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- msg
|
||||
- result
|
||||
- raw_content
|
||||
properties:
|
||||
msg:
|
||||
type: string
|
||||
result:
|
||||
type: string
|
||||
raw_content:
|
||||
type: string
|
||||
description: Body of the queried message.
|
||||
patch:
|
||||
description: Edit a message that has already been sent.
|
||||
parameters:
|
||||
|
||||
@@ -467,6 +467,42 @@ paths:
|
||||
"result": "error"
|
||||
}
|
||||
/messages/{message_id}:
|
||||
get:
|
||||
description: Get the raw content of a message.
|
||||
parameters:
|
||||
- name: message_id
|
||||
in: path
|
||||
description: The target message's ID.
|
||||
schema:
|
||||
type: integer
|
||||
example: 42
|
||||
required: true
|
||||
security:
|
||||
- basicAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/JsonSuccess'
|
||||
- properties:
|
||||
raw_content:
|
||||
type: string
|
||||
description: The raw content of the message.
|
||||
- example:
|
||||
{
|
||||
"raw_content": "**Don't** forget your towel!",
|
||||
"result": "success",
|
||||
"msg": ""
|
||||
}
|
||||
'400':
|
||||
description: Bad request.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InvalidMessageError'
|
||||
patch:
|
||||
description: Edit a message that has already been sent.
|
||||
parameters:
|
||||
@@ -1476,6 +1512,19 @@ components:
|
||||
"queue_id": "1518820930:1",
|
||||
"result": "error"
|
||||
}
|
||||
InvalidMessageError:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/JsonSuccess'
|
||||
- properties:
|
||||
raw_content:
|
||||
type: string
|
||||
description: The raw content of the message.
|
||||
- example:
|
||||
{
|
||||
"msg": "Invalid message(s)",
|
||||
"code": "BAD_REQUEST",
|
||||
"result": "error"
|
||||
}
|
||||
NonExistingStreamError:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/CodedError'
|
||||
|
||||
Reference in New Issue
Block a user