OpenAPI: MastodonAPI Media Controller
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 16 Feb 2021 22:37:16 +0000 (23:37 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 15 Mar 2021 05:47:06 +0000 (06:47 +0100)
lib/pleroma/web/api_spec/operations/media_operation.ex
test/pleroma/web/mastodon_api/controllers/media_controller_test.exs

index 85aa14869e524c7b22b3ccc0eac5f0babfed8f82..1e245b291b80885780b5ac62a558361b1d90ac70 100644 (file)
@@ -105,6 +105,7 @@ defmodule Pleroma.Web.ApiSpec.MediaOperation do
       responses: %{
         200 => Operation.response("Media", "application/json", Attachment),
         401 => Operation.response("Media", "application/json", ApiError),
+        403 => Operation.response("Media", "application/json", ApiError),
         422 => Operation.response("Media", "application/json", ApiError)
       }
     }
index 6c8f984d50ea9009364fe4a7ffd6400fbaa8ade2..39d7f99f6596c01d3510a6d6689b994fc80bec67 100644 (file)
@@ -140,7 +140,7 @@ defmodule Pleroma.Web.MastodonAPI.MediaControllerTest do
 
       conn
       |> get("/api/v1/media/#{object.id}")
-      |> json_response(403)
+      |> json_response_and_validate_schema(403)
     end
   end
 end