Add OpenAPI spec for ConversationController
[akkoma] / lib / pleroma / web / api_spec / schemas / status.ex
index a022450e626c69b9e33d91c7bb120541ee98a11d..42e9dae19fdae009d6e69d7a21652ec7b0cc8d6c 100644 (file)
@@ -5,7 +5,8 @@
 defmodule Pleroma.Web.ApiSpec.Schemas.Status do
   alias OpenApiSpex.Schema
   alias Pleroma.Web.ApiSpec.Schemas.Account
-  alias Pleroma.Web.ApiSpec.Schemas.AccountEmoji
+  alias Pleroma.Web.ApiSpec.Schemas.Emoji
+  alias Pleroma.Web.ApiSpec.Schemas.FlakeID
   alias Pleroma.Web.ApiSpec.Schemas.Poll
   alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
 
@@ -40,10 +41,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
       },
       content: %Schema{type: :string, format: :html},
       created_at: %Schema{type: :string, format: "date-time"},
-      emojis: %Schema{type: :array, items: AccountEmoji},
+      emojis: %Schema{type: :array, items: Emoji},
       favourited: %Schema{type: :boolean},
       favourites_count: %Schema{type: :integer},
-      id: %Schema{type: :string},
+      id: FlakeID,
       in_reply_to_account_id: %Schema{type: :string, nullable: true},
       in_reply_to_id: %Schema{type: :string, nullable: true},
       language: %Schema{type: :string, nullable: true},
@@ -85,7 +86,12 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
         properties: %{
           content: %Schema{type: :object, additionalProperties: %Schema{type: :string}},
           conversation_id: %Schema{type: :integer},
-          direct_conversation_id: %Schema{type: :string, nullable: true},
+          direct_conversation_id: %Schema{
+            type: :integer,
+            nullable: true,
+            description:
+              "The ID of the Mastodon direct message conversation the status is associated with (if any)"
+          },
           emoji_reactions: %Schema{
             type: :array,
             items: %Schema{