2020-04-05 22:15:37 +02:00
|
|
|
# Pleroma: A lightweight social networking server
|
|
|
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-04-27 20:55:05 +02:00
|
|
|
defmodule Pleroma.Web.ApiSpec.Schemas.Emoji do
|
2020-04-05 22:15:37 +02:00
|
|
|
alias OpenApiSpex.Schema
|
|
|
|
|
|
|
|
require OpenApiSpex
|
|
|
|
|
|
|
|
OpenApiSpex.schema(%{
|
2020-04-27 20:55:05 +02:00
|
|
|
title: "Emoji",
|
|
|
|
description: "Response schema for an emoji",
|
2020-04-05 22:15:37 +02:00
|
|
|
type: :object,
|
|
|
|
properties: %{
|
|
|
|
shortcode: %Schema{type: :string},
|
2020-04-21 21:30:24 +02:00
|
|
|
url: %Schema{type: :string, format: :uri},
|
|
|
|
static_url: %Schema{type: :string, format: :uri},
|
2020-04-05 22:15:37 +02:00
|
|
|
visible_in_picker: %Schema{type: :boolean}
|
|
|
|
},
|
|
|
|
example: %{
|
2020-04-21 21:30:24 +02:00
|
|
|
"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
|
2020-04-05 22:15:37 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|