1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.Attachment do
6 alias OpenApiSpex.Schema
12 description: "Represents a file or media attachment that can be added to a status.",
14 requried: [:id, :url, :preview_url],
16 id: %Schema{type: :string, description: "The ID of the attachment in the database."},
20 description: "The location of the original full-size attachment"
26 "The location of the full-size original attachment on the remote website. String (URL), or null if the attachment is local",
32 description: "The location of a scaled-down preview of the attachment"
37 description: "A shorter URL for the attachment"
43 "Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load"
47 enum: ["image", "video", "audio", "unknown"],
48 description: "The type of the attachment"
53 mime_type: %Schema{type: :string, description: "mime type of the attachment"}
61 remote_url: "someurl",
62 preview_url: "someurl",
65 pleroma: %{mime_type: "image/png"}