Add ability to follow hashtags (#336)
[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 },
26 example: %{
27 name: "cofe",
28 url: "https://lain.com/tag/cofe",
29 following: false
30 }
31 })
32 end