X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Foperations%2Fapp_operation.ex;h=2284ac127658778ec9fce13d1d35b0b28f761da3;hb=87bb417c994bede0cc155d1fe5a7decb807453f2;hp=217609b0136414de3bd94bbfcfe638c56b870b5e;hpb=eab6291094314846425339ec51fffbc94cab5501;p=akkoma diff --git a/lib/pleroma/web/api_spec/operations/app_operation.ex b/lib/pleroma/web/api_spec/operations/app_operation.ex index 217609b01..2284ac127 100644 --- a/lib/pleroma/web/api_spec/operations/app_operation.ex +++ b/lib/pleroma/web/api_spec/operations/app_operation.ex @@ -14,19 +14,6 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do apply(__MODULE__, operation, []) end - @spec index_operation() :: Operation.t() - def index_operation do - %Operation{ - tags: ["Applications"], - summary: "List applications", - description: "List the OAuth applications for the current user", - operationId: "AppController.index", - responses: %{ - 200 => Operation.response("Array of App", "application/json", array_of_apps()) - } - } - end - @spec create_operation() :: Operation.t() def create_operation do %Operation{ @@ -36,7 +23,7 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do operationId: "AppController.create", requestBody: Helpers.request_body("Parameters", create_request(), required: true), responses: %{ - 200 => create_response(), + 200 => Operation.response("App", "application/json", App), 422 => Operation.response( "Unprocessable Entity", @@ -133,12 +120,4 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do } } end - - defp create_response do - Operation.response("App", "application/json", App) - end - - defp array_of_apps do - %Schema{type: :array, items: App, example: [App.schema().example]} - end end