move to 2.5.5
[anni] / lib / pleroma / web / api_spec / schemas / emoji.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.Emoji do
6   alias OpenApiSpex.Schema
7
8   require OpenApiSpex
9
10   OpenApiSpex.schema(%{
11     title: "Emoji",
12     description: "Response schema for an emoji",
13     type: :object,
14     properties: %{
15       shortcode: %Schema{type: :string},
16       url: %Schema{type: :string, format: :uri},
17       static_url: %Schema{type: :string, format: :uri},
18       visible_in_picker: %Schema{type: :boolean}
19     },
20     example: %{
21       "shortcode" => "fatyoshi",
22       "url" =>
23         "https://files.mastodon.social/custom_emojis/images/000/023/920/original/e57ecb623faa0dc9.png",
24       "static_url" =>
25         "https://files.mastodon.social/custom_emojis/images/000/023/920/static/e57ecb623faa0dc9.png",
26       "visible_in_picker" => true
27     }
28   })
29 end