Add /api/v1/followed_tags
[akkoma] / lib / pleroma / web / api_spec / schemas / tag.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.Tag do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "Tag",
12 description: "Represents a hashtag used within the content of a status",
13 type: :object,
14 properties: %{
15 name: %Schema{type: :string, description: "The value of the hashtag after the # sign"},
16 url: %Schema{
17 type: :string,
18 format: :uri,
19 description: "A link to the hashtag on the instance"
20 },
21 following: %Schema{
22 type: :boolean,
23 description: "Whether the authenticated user is following the hashtag"
24 },
25 history: %Schema{
26 type: :array,
27 items: %Schema{type: :string},
28 description:
29 "A list of historical uses of the hashtag (not implemented, for compatibility only)"
30 }
31 },
32 example: %{
33 name: "cofe",
34 url: "https://lain.com/tag/cofe",
35 following: false
36 }
37 })
38 end