summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas/emoji.ex
blob: ceb3c7186053ca962eb1edcd31b3bb40f7ab08fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.ApiSpec.Schemas.Emoji do
  alias OpenApiSpex.Schema

  require OpenApiSpex

  OpenApiSpex.schema(%{
    title: "Emoji",
    description: "Response schema for an emoji",
    type: :object,
    properties: %{
      shortcode: %Schema{type: :string},
      url: %Schema{type: :string, format: :uri},
      static_url: %Schema{type: :string, format: :uri},
      visible_in_picker: %Schema{type: :boolean}
    },
    example: %{
      "shortcode" => "fatyoshi",
      "url" =>
        "https://files.mastodon.social/custom_emojis/images/000/023/920/original/e57ecb623faa0dc9.png",
      "static_url" =>
        "https://files.mastodon.social/custom_emojis/images/000/023/920/static/e57ecb623faa0dc9.png",
      "visible_in_picker" => true
    }
  })
end