Merge branch 'chores/bump-copyright' into 'develop'
[akkoma] / lib / pleroma / web / api_spec / schemas / account_field.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.AccountField do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "AccountField",
12 description: "Response schema for account custom fields",
13 type: :object,
14 properties: %{
15 name: %Schema{type: :string},
16 value: %Schema{type: :string, format: :html},
17 verified_at: %Schema{type: :string, format: :"date-time", nullable: true}
18 },
19 example: %{
20 "name" => "Website",
21 "value" =>
22 "<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>",
23 "verified_at" => "2019-08-29T04:14:55.571+00:00"
24 }
25 })
26 end