logo

pleroma

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

announcement.ex (1273B)


  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.Announcement do
  5. alias OpenApiSpex.Schema
  6. alias Pleroma.Web.ApiSpec.Schemas.FlakeID
  7. require OpenApiSpex
  8. OpenApiSpex.schema(%{
  9. title: "Announcement",
  10. description: "Response schema for an announcement",
  11. type: :object,
  12. properties: %{
  13. id: FlakeID,
  14. content: %Schema{type: :string},
  15. starts_at: %Schema{
  16. type: :string,
  17. format: "date-time",
  18. nullable: true
  19. },
  20. ends_at: %Schema{
  21. type: :string,
  22. format: "date-time",
  23. nullable: true
  24. },
  25. all_day: %Schema{type: :boolean},
  26. published_at: %Schema{type: :string, format: "date-time"},
  27. updated_at: %Schema{type: :string, format: "date-time"},
  28. read: %Schema{type: :boolean},
  29. mentions: %Schema{type: :array},
  30. statuses: %Schema{type: :array},
  31. tags: %Schema{type: :array},
  32. emojis: %Schema{type: :array},
  33. reactions: %Schema{type: :array},
  34. pleroma: %Schema{
  35. type: :object,
  36. properties: %{
  37. raw_content: %Schema{type: :string}
  38. }
  39. }
  40. }
  41. })
  42. end