diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-04-29 17:03:17 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-04-29 17:03:17 +0300 |
commit | 7ef37ed99db69d8553e638e88527ded475f54a5f (patch) | |
tree | e2a6bae013f29ca7d6a8dfb69be1aa13d0a6b5af /lib/pleroma/web/api_spec/schemas/account_field.ex | |
parent | 37998e43636265d7709dbbf4926b07b7f94e04ea (diff) | |
parent | 58fded9858edbeb318dc011cb313e82a86fbafcb (diff) | |
download | pleroma-7ef37ed99db69d8553e638e88527ded475f54a5f.tar.gz |
merge develop
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas/account_field.ex')
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/account_field.ex | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/account_field.ex b/lib/pleroma/web/api_spec/schemas/account_field.ex new file mode 100644 index 000000000..fa97073a0 --- /dev/null +++ b/lib/pleroma/web/api_spec/schemas/account_field.ex @@ -0,0 +1,26 @@ +# 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.AccountField do + alias OpenApiSpex.Schema + + require OpenApiSpex + + OpenApiSpex.schema(%{ + title: "AccountField", + description: "Response schema for account custom fields", + type: :object, + properties: %{ + name: %Schema{type: :string}, + value: %Schema{type: :string, format: :html}, + verified_at: %Schema{type: :string, format: :"date-time", nullable: true} + }, + example: %{ + "name" => "Website", + "value" => + "<a href=\"https://pleroma.com\" rel=\"me nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"\">pleroma.com</span><span class=\"invisible\"></span></a>", + "verified_at" => "2019-08-29T04:14:55.571+00:00" + } + }) +end |