aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-05-05 17:05:34 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-05-05 17:05:34 +0400
commit5ec6aad5670cf0888942a13e83b9ffd16e97dd18 (patch)
tree331acd7ec3d78cc9bc6c3aa70b89db17315b38a4 /lib/pleroma/web/api_spec/schemas
parent33f29760200e00305be20350898ebfd2b3ce21af (diff)
downloadpleroma-5ec6aad5670cf0888942a13e83b9ffd16e97dd18.tar.gz
Add OpenAPI spec for ListController
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas')
-rw-r--r--lib/pleroma/web/api_spec/schemas/list.ex23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/list.ex b/lib/pleroma/web/api_spec/schemas/list.ex
new file mode 100644
index 000000000..78aa0736f
--- /dev/null
+++ b/lib/pleroma/web/api_spec/schemas/list.ex
@@ -0,0 +1,23 @@
+# 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.List do
+ alias OpenApiSpex.Schema
+
+ require OpenApiSpex
+
+ OpenApiSpex.schema(%{
+ title: "List",
+ description: "Represents a list of some users that the authenticated user follows",
+ type: :object,
+ properties: %{
+ id: %Schema{type: :string, description: "The internal database ID of the list"},
+ title: %Schema{type: :string, description: "The user-defined title of the list"}
+ },
+ example: %{
+ "id" => "12249",
+ "title" => "Friends"
+ }
+ })
+end