OpenAPI: PleromaAPI UserImport Controller

This commit is contained in:
Haelwenn (lanodan) Monnier 2021-02-17 01:07:56 +01:00
parent ef5de5eb39
commit e4743847a1
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 2 additions and 1 deletions

View file

@ -23,6 +23,7 @@ def follow_operation do
requestBody: request_body("Parameters", import_request(), required: true), requestBody: request_body("Parameters", import_request(), required: true),
responses: %{ responses: %{
200 => ok_response(), 200 => ok_response(),
403 => Operation.response("Error", "application/json", ApiError),
500 => Operation.response("Error", "application/json", ApiError) 500 => Operation.response("Error", "application/json", ApiError)
}, },
security: [%{"oAuth" => ["write:follow"]}] security: [%{"oAuth" => ["write:follow"]}]

View file

@ -83,7 +83,7 @@ test "requires 'follow' or 'write:follows' permissions" do
assert %{"error" => "Insufficient permissions: follow | write:follows."} == assert %{"error" => "Insufficient permissions: follow | write:follows."} ==
json_response(conn, 403) json_response(conn, 403)
else else
assert json_response(conn, 200) assert json_response_and_validate_schema(conn, 200)
end end
end end
end end