move to 2.5.5
[anni] / lib / pleroma / web / api_spec / schemas / tag.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 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     },
22     example: %{
23       name: "cofe",
24       url: "https://lain.com/tag/cofe"
25     }
26   })
27 end