Merge remote-tracking branch 'remotes/origin/develop' into 1364-no-pushes-from-blocke...
[akkoma] / lib / pleroma / web / api_spec / schemas / custom_emoji.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.Schemas.CustomEmoji do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "CustomEmoji",
12 description: "Response schema for an CustomEmoji",
13 type: :object,
14 properties: %{
15 shortcode: %Schema{type: :string},
16 url: %Schema{type: :string},
17 static_url: %Schema{type: :string},
18 visible_in_picker: %Schema{type: :boolean},
19 category: %Schema{type: :string},
20 tags: %Schema{type: :array}
21 },
22 example: %{
23 "shortcode" => "aaaa",
24 "url" => "https://files.mastodon.social/custom_emojis/images/000/007/118/original/aaaa.png",
25 "static_url" =>
26 "https://files.mastodon.social/custom_emojis/images/000/007/118/static/aaaa.png",
27 "visible_in_picker" => true
28 }
29 })
30 end