diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-07 14:53:12 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-13 18:16:07 +0400 |
commit | 260cbddc943e53a85762e56852de65d2b900cc04 (patch) | |
tree | 35392d875d9496dbe137c8cff5a8a20a83e8af28 /lib/pleroma/web/api_spec/operations/account_operation.ex | |
parent | f80116125f928de36c93627bbdf5f6578396f53b (diff) | |
download | pleroma-260cbddc943e53a85762e56852de65d2b900cc04.tar.gz |
Add spec for AccountController.update_credentials
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/account_operation.ex')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/account_operation.ex | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index 3d2270c29..d7b56cc2b 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -8,6 +8,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do alias Pleroma.Web.ApiSpec.Schemas.Account alias Pleroma.Web.ApiSpec.Schemas.AccountCreateRequest alias Pleroma.Web.ApiSpec.Schemas.AccountCreateResponse + alias Pleroma.Web.ApiSpec.Schemas.AccountUpdateCredentialsRequest @spec open_api_operation(atom) :: Operation.t() def open_api_operation(action) do @@ -44,7 +45,18 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do end def update_credentials_operation do - :ok + %Operation{ + tags: ["accounts"], + summary: "Update account credentials", + description: "Update the user's display and preferences.", + operationId: "AccountController.update_credentials", + security: [%{"oAuth" => ["write:accounts"]}], + requestBody: + Helpers.request_body("Parameters", AccountUpdateCredentialsRequest, required: true), + responses: %{ + 200 => Operation.response("Account", "application/json", Account) + } + } end def relationships_operation do |