aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/helpers.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-05-02 07:39:19 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-05-02 07:39:19 +0300
commitcf5ca7e45b7a5df18717c8b6ea0afa045e341f65 (patch)
treec586802831c88e484e770a8f62b402fa573485e3 /lib/pleroma/web/api_spec/helpers.ex
parent92efb888c7b25692af205b1a4dbce0ae689c439b (diff)
parentae921a0c24b9b1dcdea408decc691d66a538b6b8 (diff)
downloadpleroma-cf5ca7e45b7a5df18717c8b6ea0afa045e341f65.tar.gz
Merge remote-tracking branch 'remotes/origin/develop' into follow-request-notifications
Diffstat (limited to 'lib/pleroma/web/api_spec/helpers.ex')
-rw-r--r--lib/pleroma/web/api_spec/helpers.ex12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/pleroma/web/api_spec/helpers.ex b/lib/pleroma/web/api_spec/helpers.ex
index ce40fb9e8..183df43ee 100644
--- a/lib/pleroma/web/api_spec/helpers.ex
+++ b/lib/pleroma/web/api_spec/helpers.ex
@@ -41,9 +41,17 @@ defmodule Pleroma.Web.ApiSpec.Helpers do
Operation.parameter(
:limit,
:query,
- %Schema{type: :integer, default: 20, maximum: 40},
- "Limit"
+ %Schema{type: :integer, default: 20},
+ "Maximum number of items to return. Will be ignored if it's more than 40"
)
]
end
+
+ def empty_object_response do
+ Operation.response("Empty object", "application/json", %Schema{type: :object, example: %{}})
+ end
+
+ def empty_array_response do
+ Operation.response("Empty array", "application/json", %Schema{type: :array, example: []})
+ end
end