api_docs: Add "EmojiName" common component.

To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "emoji_name" in components.
This commit is contained in:
shubhamgupta2956 2020-04-22 01:54:18 +05:30 committed by Tim Abbott
parent 64ef886eb9
commit c28ccacb73
1 changed files with 15 additions and 26 deletions

View File

@ -914,18 +914,7 @@ paths:
`POST {{ api_url }}/v1/messages/{message_id}/reactions` `POST {{ api_url }}/v1/messages/{message_id}/reactions`
parameters: parameters:
- $ref: '#/components/parameters/MessageId' - $ref: '#/components/parameters/MessageId'
- name: emoji_name - $ref: '#/components/parameters/EmojiName'
in: query
description: |
Name of the emoji you want to add as as a reaction.
To find an emoji's name, hover over a message to reveal
three icons on the right, then click the smiley face icon.
Images of available reaction emojis appear. Hover over the
emoji you want, and note that emoji's text name.
schema:
type: string
example: 'octopus'
required: true required: true
- name: emoji_code - name: emoji_code
in: query in: query
@ -987,20 +976,7 @@ paths:
`DELETE {{ api_url }}/v1/messages/{message_id}/reactions` `DELETE {{ api_url }}/v1/messages/{message_id}/reactions`
parameters: parameters:
- $ref: '#/components/parameters/MessageId' - $ref: '#/components/parameters/MessageId'
- name: emoji_name - $ref: '#/components/parameters/EmojiName'
in: query
description: |
Name of the emoji you want to delete from a reaction.
To find an emoji's name, hover over a message to
reveal three icons on the right, then click the smiley face icon.
Images of available reaction emojis appear. Hover over the emoji
you want, and note that emoji's text name.
Ignored if emoji_code is also passed.
schema:
type: string
example: 'octopus'
required: false required: false
- name: emoji_code - name: emoji_code
in: query in: query
@ -3850,3 +3826,16 @@ components:
type: boolean type: boolean
default: false default: false
example: true example: true
EmojiName:
name: emoji_name
in: query
description: |
Name of the emoji.
To find an emoji's name, hover over a message to reveal
three icons on the right, then click the smiley face icon.
Images of available reaction emojis appear. Hover over the
emoji you want, and note that emoji's text name.
schema:
type: string
example: 'octopus'