X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Fschemas%2Fstatus.ex;h=60db8ad6fa60324a050213e7edb756be01973ee7;hb=1419eee5dfe1f3d76c28ab7c6f3cb24ba652fef2;hp=61ebd8089c7a6256cf4df7ffb7823108b3e888cf;hpb=958a7f6ed071a5bfd0ea92c602fe0ee876c1e4c6;p=akkoma diff --git a/lib/pleroma/web/api_spec/schemas/status.ex b/lib/pleroma/web/api_spec/schemas/status.ex index 61ebd8089..60db8ad6f 100644 --- a/lib/pleroma/web/api_spec/schemas/status.ex +++ b/lib/pleroma/web/api_spec/schemas/status.ex @@ -23,9 +23,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do application: %Schema{ description: "The application used to post this status", type: :object, + nullable: true, properties: %{ name: %Schema{type: :string}, - website: %Schema{type: :string, nullable: true, format: :uri} + website: %Schema{type: :string, format: :uri} } }, bookmarked: %Schema{type: :boolean, description: "Have you bookmarked this status?"}, @@ -132,6 +133,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: %{ @@ -193,6 +204,40 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do parent_visible: %Schema{ type: :boolean, description: "`true` if the parent post is visible to the user" + }, + pinned_at: %Schema{ + type: :string, + format: "date-time", + nullable: true, + description: + "A datetime (ISO 8601) that states when the post was pinned or `null` if the post is not pinned" + } + } + }, + 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 + } + } + } + ] } } }, @@ -274,9 +319,11 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do "id" => "9toJCsKN7SmSf3aj5c", "muting" => false, "muting_notifications" => false, + "note" => "", "requested" => false, "showing_reblogs" => true, - "subscribing" => false + "subscribing" => false, + "notifying" => false }, "skip_thread_containment" => false, "tags" => [] @@ -291,7 +338,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do "url" => "http://localhost:4001/users/nick6", "username" => "nick6" }, - "application" => %{"name" => "Web", "website" => nil}, + "application" => nil, "bookmarked" => false, "card" => nil, "content" => "foobar",