OpenAPI: MastodonAPI Media Controller

This commit is contained in:
Haelwenn (lanodan) Monnier 2021-02-16 23:37:16 +01:00
parent 7eecc3b61d
commit 3123ecdd6e
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 2 additions and 1 deletions

View 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)
}
}

View 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