2022-03-08 05:06:07 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
2023-01-02 20:38:50 +00:00
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
2022-03-08 05:06:07 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Pleroma.Web.ApiSpec.Schemas.Announcement do
|
|
|
|
alias OpenApiSpex.Schema
|
|
|
|
alias Pleroma.Web.ApiSpec.Schemas.FlakeID
|
|
|
|
|
|
|
|
require OpenApiSpex
|
|
|
|
|
|
|
|
OpenApiSpex.schema(%{
|
2022-03-08 14:35:35 +00:00
|
|
|
title: "Announcement",
|
|
|
|
description: "Response schema for an announcement",
|
2022-03-08 05:06:07 +00:00
|
|
|
type: :object,
|
|
|
|
properties: %{
|
|
|
|
id: FlakeID,
|
|
|
|
content: %Schema{type: :string},
|
2022-03-08 14:35:35 +00:00
|
|
|
starts_at: %Schema{
|
2022-03-09 00:12:01 +00:00
|
|
|
type: :string,
|
|
|
|
format: "date-time",
|
|
|
|
nullable: true
|
2022-03-08 14:35:35 +00:00
|
|
|
},
|
|
|
|
ends_at: %Schema{
|
2022-03-09 00:12:01 +00:00
|
|
|
type: :string,
|
|
|
|
format: "date-time",
|
|
|
|
nullable: true
|
2022-03-08 14:35:35 +00:00
|
|
|
},
|
|
|
|
all_day: %Schema{type: :boolean},
|
2022-03-08 05:06:07 +00:00
|
|
|
published_at: %Schema{type: :string, format: "date-time"},
|
2022-03-08 14:35:35 +00:00
|
|
|
updated_at: %Schema{type: :string, format: "date-time"},
|
|
|
|
read: %Schema{type: :boolean},
|
|
|
|
mentions: %Schema{type: :array},
|
|
|
|
statuses: %Schema{type: :array},
|
|
|
|
tags: %Schema{type: :array},
|
|
|
|
emojis: %Schema{type: :array},
|
2022-03-09 04:00:51 +00:00
|
|
|
reactions: %Schema{type: :array},
|
|
|
|
pleroma: %Schema{
|
|
|
|
type: :object,
|
|
|
|
properties: %{
|
|
|
|
raw_content: %Schema{type: :string}
|
|
|
|
}
|
|
|
|
}
|
2022-03-08 05:06:07 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|