From c28ccacb73934a9b744fad96bc2572f65fdf0a31 Mon Sep 17 00:00:00 2001 From: shubhamgupta2956 Date: Wed, 22 Apr 2020 01:54:18 +0530 Subject: [PATCH] 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. --- zerver/openapi/zulip.yaml | 41 ++++++++++++++------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 1ed52ab260..82650823aa 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -914,18 +914,7 @@ paths: `POST {{ api_url }}/v1/messages/{message_id}/reactions` parameters: - $ref: '#/components/parameters/MessageId' - - name: emoji_name - 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' + - $ref: '#/components/parameters/EmojiName' required: true - name: emoji_code in: query @@ -987,20 +976,7 @@ paths: `DELETE {{ api_url }}/v1/messages/{message_id}/reactions` parameters: - $ref: '#/components/parameters/MessageId' - - name: emoji_name - 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' + - $ref: '#/components/parameters/EmojiName' required: false - name: emoji_code in: query @@ -3850,3 +3826,16 @@ components: type: boolean default: false 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'