summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/operations/account_operation.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/account_operation.ex')
-rw-r--r--lib/pleroma/web/api_spec/operations/account_operation.ex14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex
index 35d8609ef..768d3c720 100644
--- a/lib/pleroma/web/api_spec/operations/account_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/account_operation.ex
@@ -343,7 +343,15 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
description: "Addds the given account to endorsed accounts list.",
parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}],
responses: %{
- 200 => Operation.response("Relationship", "application/json", AccountRelationship)
+ 200 => Operation.response("Relationship", "application/json", AccountRelationship),
+ 400 =>
+ Operation.response("Bad Request", "application/json", %Schema{
+ allOf: [ApiError],
+ title: "Unprocessable Entity",
+ example: %{
+ "error" => "You have already pinned the maximum number of users"
+ }
+ })
}
}
end
@@ -453,10 +461,10 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
tags: ["Retrieve account information"],
summary: "Endorsements",
operationId: "AccountController.endorsements",
- description: "Not implemented",
+ description: "Returns endorsed accounts",
security: [%{"oAuth" => ["read:accounts"]}],
responses: %{
- 200 => empty_array_response()
+ 200 => Operation.response("Array of Accounts", "application/json", array_of_accounts())
}
}
end