X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Fschemas%2Fstatus.ex;h=a6df9be94d7e242f0259c6b8746076813f29634b;hb=a079ec3a3cdfd42d2cbd51c7698c2c87828e5778;hp=3caab0f00dd7f723144e73d89d092569b30a115b;hpb=6e27fc9c12be2bd4ac4287a5a775ff8862ee92c6;p=akkoma diff --git a/lib/pleroma/web/api_spec/schemas/status.ex b/lib/pleroma/web/api_spec/schemas/status.ex index 3caab0f00..a6df9be94 100644 --- a/lib/pleroma/web/api_spec/schemas/status.ex +++ b/lib/pleroma/web/api_spec/schemas/status.ex @@ -73,6 +73,12 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do format: "date-time", description: "The date when this status was created" }, + edited_at: %Schema{ + type: :string, + format: "date-time", + nullable: true, + description: "The date when this status was last edited" + }, emojis: %Schema{ type: :array, items: Emoji, @@ -133,6 +139,16 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do type: :boolean, description: "Have you pinned this status? Only appears if the status is pinnable." }, + quote_id: %Schema{ + type: :string, + description: "ID of the status being quoted", + nullable: true + }, + quote: %Schema{ + allOf: [%OpenApiSpex.Reference{"$ref": "#/components/schemas/Status"}], + nullable: true, + description: "Quoted status (if any)" + }, pleroma: %Schema{ type: :object, properties: %{ @@ -142,9 +158,15 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do description: "A map consisting of alternate representations of the `content` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain`" }, + context: %Schema{ + type: :string, + description: "The thread identifier the status is associated with" + }, conversation_id: %Schema{ type: :integer, - description: "The ID of the AP context the status is associated with (if any)" + deprecated: true, + description: + "The ID of the AP context the status is associated with (if any); deprecated, please use `context` instead" }, direct_conversation_id: %Schema{ type: :integer, @@ -204,6 +226,33 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do } } }, + akkoma: %Schema{ + type: :object, + properties: %{ + source: %Schema{ + nullable: true, + oneOf: [ + %Schema{type: :string, example: 'plaintext content'}, + %Schema{ + type: :object, + properties: %{ + content: %Schema{ + type: :string, + description: "The source content of the status", + nullable: true + }, + mediaType: %Schema{ + type: :string, + description: "The source MIME type of the status", + example: "text/plain", + nullable: true + } + } + } + ] + } + } + }, poll: %Schema{allOf: [Poll], nullable: true, description: "The poll attached to the status"}, reblog: %Schema{ allOf: [%OpenApiSpex.Reference{"$ref": "#/components/schemas/Status"}], @@ -319,6 +368,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do "pinned" => false, "pleroma" => %{ "content" => %{"text/plain" => "foobar"}, + "context" => "http://localhost:4001/objects/8b4c0c80-6a37-4d2a-b1b9-05a19e3875aa", "conversation_id" => 345_972, "direct_conversation_id" => nil, "emoji_reactions" => [],