logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

tag.ex (1109B)


  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. defmodule Pleroma.Web.ApiSpec.Schemas.Tag do
  5. alias OpenApiSpex.Schema
  6. require OpenApiSpex
  7. OpenApiSpex.schema(%{
  8. title: "Tag",
  9. description: "Represents a hashtag used within the content of a status",
  10. type: :object,
  11. properties: %{
  12. name: %Schema{type: :string, description: "The value of the hashtag after the # sign"},
  13. url: %Schema{
  14. type: :string,
  15. format: :uri,
  16. description: "A link to the hashtag on the instance"
  17. },
  18. following: %Schema{
  19. type: :boolean,
  20. description: "Whether the authenticated user is following the hashtag"
  21. },
  22. history: %Schema{
  23. type: :array,
  24. items: %Schema{type: :string},
  25. description:
  26. "A list of historical uses of the hashtag (not implemented, for compatibility only)"
  27. }
  28. },
  29. example: %{
  30. name: "cofe",
  31. url: "https://lain.com/tag/cofe",
  32. following: false
  33. }
  34. })
  35. end