Add spec for AccountController.update_credentials
[akkoma] / lib / pleroma / web / api_spec / schemas / account_field_attribute.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.AccountAttributeField do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "AccountAttributeField",
12 description: "Request schema for account custom fields",
13 type: :object,
14 properties: %{
15 name: %Schema{type: :string},
16 value: %Schema{type: :string}
17 },
18 required: [:name, :value],
19 example: %{
20 "JSON" => %{
21 "name" => "Website",
22 "value" => "https://pleroma.com"
23 }
24 }
25 })
26 end