summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas/account_field_attribute.ex
blob: 89e483655c2cfaecfccd0224d415c67d5ede34cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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.AccountAttributeField do
  alias OpenApiSpex.Schema

  require OpenApiSpex

  OpenApiSpex.schema(%{
    title: "AccountAttributeField",
    description: "Request schema for account custom fields",
    type: :object,
    properties: %{
      name: %Schema{type: :string},
      value: %Schema{type: :string}
    },
    required: [:name, :value],
    example: %{
      "name" => "Website",
      "value" => "https://pleroma.com"
    }
  })
end