TwitterAPI: allow deleting one's own account with request body
[akkoma] / lib / pleroma / web / api_spec / operations / app_operation.ex
index 035ef24707a463ce07eb9b86e596d943ae41bf48..dfb1c71706c4c4ed6b6be97f986f1c6af97aa81d 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ApiSpec.AppOperation do
@@ -16,7 +16,7 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do
   @spec create_operation() :: Operation.t()
   def create_operation do
     %Operation{
-      tags: ["apps"],
+      tags: ["Applications"],
       summary: "Create an application",
       description: "Create a new application to obtain OAuth2 credentials",
       operationId: "AppController.create",
@@ -45,15 +45,11 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do
 
   def verify_credentials_operation do
     %Operation{
-      tags: ["apps"],
-      summary: "Verify your app works",
+      tags: ["Applications"],
+      summary: "Verify the application works",
       description: "Confirm that the app's OAuth2 credentials work.",
       operationId: "AppController.verify_credentials",
-      security: [
-        %{
-          "oAuth" => ["read"]
-        }
-      ],
+      security: [%{"oAuth" => ["read"]}],
       responses: %{
         200 =>
           Operation.response("App", "application/json", %Schema{
@@ -109,7 +105,11 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do
           description: "Space separated list of scopes",
           default: "read"
         },
-        website: %Schema{type: :string, description: "A URL to the homepage of your app"}
+        website: %Schema{
+          type: :string,
+          nullable: true,
+          description: "A URL to the homepage of your app"
+        }
       },
       required: [:client_name, :redirect_uris],
       example: %{