OpenAPI: fix various errors pointed out by editor.swagger.io
[akkoma] / lib / pleroma / web / api_spec / operations / chat_operation.ex
index 45fbad3119b2361a3548a726c2b9be1292008457..56554d5b4a3d0913733ad8391390ef4f94b56689 100644 (file)
@@ -184,7 +184,8 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
             "application/json",
             ChatMessage
           ),
-        400 => Operation.response("Bad Request", "application/json", ApiError)
+        400 => Operation.response("Bad Request", "application/json", ApiError),
+        422 => Operation.response("MRF Rejection", "application/json", ApiError)
       },
       security: [
         %{
@@ -300,11 +301,11 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
           "content" => "Check this out :firefox:",
           "id" => "13",
           "chat_id" => "1",
-          "actor_id" => "someflakeid",
+          "account_id" => "someflakeid",
           "unread" => false
         },
         %{
-          "actor_id" => "someflakeid",
+          "account_id" => "someflakeid",
           "content" => "Whats' up?",
           "id" => "12",
           "chat_id" => "1",
@@ -340,10 +341,11 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
       title: "MarkAsReadRequest",
       description: "POST body for marking a number of chat messages as read",
       type: :object,
+      required: [:last_read_id],
       properties: %{
         last_read_id: %Schema{
           type: :string,
-          description: "The content of your message. Optional."
+          description: "The content of your message."
         }
       },
       example: %{