Add active user count
[akkoma] / lib / pleroma / web / api_spec / operations / pleroma_emoji_file_operation.ex
index b6932157aef07908bdc10cbb062aa53f9c4f45de..83981f4e71c09dd8fb4bff94c8e67fd5c6aecfe6 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.PleromaEmojiFileOperation do
@@ -24,8 +24,11 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiFileOperation do
       parameters: [name_param()],
       responses: %{
         200 => Operation.response("Files Object", "application/json", files_object()),
+        422 => Operation.response("Unprocessable Entity", "application/json", ApiError),
+        404 => Operation.response("Not Found", "application/json", ApiError),
         400 => Operation.response("Bad Request", "application/json", ApiError),
-        409 => Operation.response("Conflict", "application/json", ApiError)
+        409 => Operation.response("Conflict", "application/json", ApiError),
+        500 => Operation.response("Error", "application/json", ApiError)
       }
     }
   end
@@ -67,8 +70,10 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiFileOperation do
       parameters: [name_param()],
       responses: %{
         200 => Operation.response("Files Object", "application/json", files_object()),
+        404 => Operation.response("Not Found", "application/json", ApiError),
         400 => Operation.response("Bad Request", "application/json", ApiError),
-        409 => Operation.response("Conflict", "application/json", ApiError)
+        409 => Operation.response("Conflict", "application/json", ApiError),
+        422 => Operation.response("Unprocessable Entity", "application/json", ApiError)
       }
     }
   end
@@ -114,13 +119,15 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiFileOperation do
       ],
       responses: %{
         200 => Operation.response("Files Object", "application/json", files_object()),
-        400 => Operation.response("Bad Request", "application/json", ApiError)
+        400 => Operation.response("Bad Request", "application/json", ApiError),
+        404 => Operation.response("Not Found", "application/json", ApiError),
+        422 => Operation.response("Unprocessable Entity", "application/json", ApiError)
       }
     }
   end
 
   defp name_param do
-    Operation.parameter(:name, :path, :string, "Pack Name", example: "cofe", required: true)
+    Operation.parameter(:name, :query, :string, "Pack Name", example: "cofe", required: true)
   end
 
   defp files_object do