aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex')
-rw-r--r--lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex b/lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex
new file mode 100644
index 000000000..01582a63d
--- /dev/null
+++ b/lib/pleroma/web/api_spec/schemas/custom_emojis_response.ex
@@ -0,0 +1,42 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ApiSpec.Schemas.CustomEmojisResponse do
+ alias Pleroma.Web.ApiSpec.Schemas.CustomEmoji
+
+ require OpenApiSpex
+
+ OpenApiSpex.schema(%{
+ title: "CustomEmojisResponse",
+ description: "Response schema for custom emojis",
+ type: :array,
+ items: CustomEmoji,
+ example: [
+ %{
+ "category" => "Fun",
+ "shortcode" => "blank",
+ "static_url" => "https://lain.com/emoji/blank.png",
+ "tags" => ["Fun"],
+ "url" => "https://lain.com/emoji/blank.png",
+ "visible_in_picker" => true
+ },
+ %{
+ "category" => "Gif,Fun",
+ "shortcode" => "firefox",
+ "static_url" => "https://lain.com/emoji/Firefox.gif",
+ "tags" => ["Gif", "Fun"],
+ "url" => "https://lain.com/emoji/Firefox.gif",
+ "visible_in_picker" => true
+ },
+ %{
+ "category" => "pack:mixed",
+ "shortcode" => "sadcat",
+ "static_url" => "https://lain.com/emoji/mixed/sadcat.png",
+ "tags" => ["pack:mixed"],
+ "url" => "https://lain.com/emoji/mixed/sadcat.png",
+ "visible_in_picker" => true
+ }
+ ]
+ })
+end