aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-04-09 18:28:14 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-04-13 18:17:08 +0400
commite4195d4a684908d58482f9c865375a080e7b78bc (patch)
tree63a27c7ff4ae1964f0994091a09b4ac803626a9b /lib/pleroma/web/api_spec/schemas
parentaa958a6dda7cdcf12e9cd9232e7c6be421610317 (diff)
downloadpleroma-e4195d4a684908d58482f9c865375a080e7b78bc.tar.gz
Add specs for AccountController.mute and AccountController.unmute
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas')
-rw-r--r--lib/pleroma/web/api_spec/schemas/account_mute_request.ex24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/account_mute_request.ex b/lib/pleroma/web/api_spec/schemas/account_mute_request.ex
new file mode 100644
index 000000000..a61f6d04c
--- /dev/null
+++ b/lib/pleroma/web/api_spec/schemas/account_mute_request.ex
@@ -0,0 +1,24 @@
+# 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.AccountMuteRequest do
+ alias OpenApiSpex.Schema
+ require OpenApiSpex
+
+ OpenApiSpex.schema(%{
+ title: "AccountMuteRequest",
+ description: "POST body for muting an account",
+ type: :object,
+ properties: %{
+ notifications: %Schema{
+ type: :boolean,
+ description: "Mute notifications in addition to statuses? Defaults to true.",
+ default: true
+ }
+ },
+ example: %{
+ "notifications" => true
+ }
+ })
+end