mirror of https://github.com/zulip/zulip.git
openapi: Edit `Messages` component to match the `message` event object.
The `Messages` schema present in `#/components/schemas` was a combination of all keys possible in any message object used in Zulip. Edit it so that the original `Messages` contains just the keys present in the `message` event. Also make another schema `GetMessages` which adds a few other keys which are received when using `GET /messages`. The message object in the `/zulip-outgoing-webhook` has also been modified and corrected.
This commit is contained in:
parent
bdf3ecea42
commit
2b879ecbdf
|
@ -613,7 +613,7 @@ paths:
|
||||||
an array of `message` objects, each containing the following
|
an array of `message` objects, each containing the following
|
||||||
fields:
|
fields:
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/Messages"
|
$ref: "#/components/schemas/GetMessages"
|
||||||
- example:
|
- example:
|
||||||
{
|
{
|
||||||
"anchor": 21,
|
"anchor": 21,
|
||||||
|
@ -4109,6 +4109,11 @@ paths:
|
||||||
A dict containing details on the message that triggered the
|
A dict containing details on the message that triggered the
|
||||||
outgoing webhook, in the format used by [`GET /messages`](/api/get-messages).
|
outgoing webhook, in the format used by [`GET /messages`](/api/get-messages).
|
||||||
- $ref: "#/components/schemas/Messages"
|
- $ref: "#/components/schemas/Messages"
|
||||||
|
- properties:
|
||||||
|
rendered_content:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
The content/body of the message rendered in HTML.
|
||||||
bot_email:
|
bot_email:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4400,10 +4405,6 @@ components:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The content/body of the message.
|
The content/body of the message.
|
||||||
rendered_content:
|
|
||||||
type: string
|
|
||||||
description: |
|
|
||||||
The content/body of the message rendered in HTML.
|
|
||||||
content_type:
|
content_type:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4438,12 +4439,6 @@ components:
|
||||||
Data on the recipient of the message;
|
Data on the recipient of the message;
|
||||||
either the name of a stream or a dictionary containing basic data on
|
either the name of a stream or a dictionary containing basic data on
|
||||||
the users who received the message.
|
the users who received the message.
|
||||||
flags:
|
|
||||||
type: array
|
|
||||||
description: |
|
|
||||||
The user's [message flags][message-flags] for the message.
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -4581,15 +4576,25 @@ components:
|
||||||
description: |
|
description: |
|
||||||
The UNIX timestamp for when the message was sent,
|
The UNIX timestamp for when the message was sent,
|
||||||
in UTC seconds.
|
in UTC seconds.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
The type of the message: `stream` or `private`.
|
||||||
|
GetMessages:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Messages"
|
||||||
|
- properties:
|
||||||
|
flags:
|
||||||
|
type: array
|
||||||
|
description: |
|
||||||
|
The user's [message flags][message-flags] for the message.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
last_edit_timestamp:
|
last_edit_timestamp:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
The UNIX timestamp for when the message was last edited,
|
The UNIX timestamp for when the message was last edited,
|
||||||
in UTC seconds.
|
in UTC seconds.
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
description: |
|
|
||||||
The type of the message: `stream` or `private`.
|
|
||||||
match_content:
|
match_content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
|
Loading…
Reference in New Issue