diff options
author | lain <lain@soykaf.club> | 2020-04-28 14:16:21 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-28 14:16:21 +0200 |
commit | b5dc59c8fa587b4db844c7fc0ba16e5cb00bfd38 (patch) | |
tree | 85fa5f1a8a1c87aaa4d6fc999995950c1da27d98 /lib/pleroma/web/api_spec/schemas/poll.ex | |
parent | f8e56d4271f8c495316d304dd0de7f0a63eb0645 (diff) | |
parent | 12bb7fc0dc94068d8337f10fc337ab23c8c7e77e (diff) | |
download | pleroma-b5dc59c8fa587b4db844c7fc0ba16e5cb00bfd38.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas/poll.ex')
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/poll.ex | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/poll.ex b/lib/pleroma/web/api_spec/schemas/poll.ex new file mode 100644 index 000000000..0474b550b --- /dev/null +++ b/lib/pleroma/web/api_spec/schemas/poll.ex @@ -0,0 +1,36 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.ApiSpec.Schemas.Poll do + alias OpenApiSpex.Schema + alias Pleroma.Web.ApiSpec.Schemas.Emoji + alias Pleroma.Web.ApiSpec.Schemas.FlakeID + + require OpenApiSpex + + OpenApiSpex.schema(%{ + title: "Poll", + description: "Response schema for account custom fields", + type: :object, + properties: %{ + id: FlakeID, + expires_at: %Schema{type: :string, format: "date-time"}, + expired: %Schema{type: :boolean}, + multiple: %Schema{type: :boolean}, + votes_count: %Schema{type: :integer}, + voted: %Schema{type: :boolean}, + emojis: %Schema{type: :array, items: Emoji}, + options: %Schema{ + type: :array, + items: %Schema{ + type: :object, + properties: %{ + title: %Schema{type: :string}, + votes_count: %Schema{type: :integer} + } + } + } + } + }) +end |