Merge branch 'develop' into global-status-expiration
[akkoma] / lib / pleroma / web / api_spec / operations / custom_emoji_operation.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.CustomEmojiOperation do
6 alias OpenApiSpex.Operation
7 alias Pleroma.Web.ApiSpec.Schemas.CustomEmojisResponse
8
9 def open_api_operation(action) do
10 operation = String.to_existing_atom("#{action}_operation")
11 apply(__MODULE__, operation, [])
12 end
13
14 def index_operation do
15 %Operation{
16 tags: ["custom_emojis"],
17 summary: "List custom custom emojis",
18 description: "Returns custom emojis that are available on the server.",
19 operationId: "CustomEmojiController.index",
20 responses: %{
21 200 => Operation.response("Custom Emojis", "application/json", CustomEmojisResponse)
22 }
23 }
24 end
25 end