diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-04-22 17:13:03 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-04-22 17:13:03 +0300 |
commit | 8b522b3b3fead67e6d1c017b79758c12e3b133af (patch) | |
tree | d8cd476a9c0607077d7cbe1fb517444bed08477a /lib/pleroma/web/api_spec/operations | |
parent | 1fe9b91ff7242412800c5a000935c132938aacec (diff) | |
parent | 1cd38dfffa88384284a8ae0be39f52f25c544936 (diff) | |
download | pleroma-8b522b3b3fead67e6d1c017b79758c12e3b133af.tar.gz |
merge develop
Diffstat (limited to 'lib/pleroma/web/api_spec/operations')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex b/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex new file mode 100644 index 000000000..cf2215823 --- /dev/null +++ b/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex @@ -0,0 +1,25 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.ApiSpec.CustomEmojiOperation do + alias OpenApiSpex.Operation + alias Pleroma.Web.ApiSpec.Schemas.CustomEmojisResponse + + def open_api_operation(action) do + operation = String.to_existing_atom("#{action}_operation") + apply(__MODULE__, operation, []) + end + + def index_operation do + %Operation{ + tags: ["custom_emojis"], + summary: "List custom custom emojis", + description: "Returns custom emojis that are available on the server.", + operationId: "CustomEmojiController.index", + responses: %{ + 200 => Operation.response("Custom Emojis", "application/json", CustomEmojisResponse) + } + } + end +end |