1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.AccountUpdateCredentialsRequest do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.AccountAttributeField
8 alias Pleroma.Web.ApiSpec.Schemas.ActorType
9 alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
13 title: "AccountUpdateCredentialsRequest",
14 description: "POST body for creating an account",
19 description: "Whether the account has a bot flag."
21 display_name: %Schema{
23 description: "The display name to use for the profile."
25 note: %Schema{type: :string, description: "The account bio."},
28 description: "Avatar image encoded using multipart/form-data",
33 description: "Header image encoded using multipart/form-data",
38 description: "Whether manual approval of follow requests is required."
40 fields_attributes: %Schema{
41 oneOf: [%Schema{type: :array, items: AccountAttributeField}, %Schema{type: :object}]
43 # NOTE: `source` field is not supported
48 # privacy: %Schema{type: :string},
49 # sensitive: %Schema{type: :boolean},
50 # language: %Schema{type: :string}
54 # Pleroma-specific fields
55 no_rich_text: %Schema{
57 description: "html tags are stripped from all statuses requested from the API"
59 hide_followers: %Schema{type: :boolean, description: "user's followers will be hidden"},
60 hide_follows: %Schema{type: :boolean, description: "user's follows will be hidden"},
61 hide_followers_count: %Schema{
63 description: "user's follower count will be hidden"
65 hide_follows_count: %Schema{
67 description: "user's follow count will be hidden"
69 hide_favorites: %Schema{
71 description: "user's favorites timeline will be hidden"
75 description: "user's role (e.g admin, moderator) will be exposed to anyone in the
78 default_scope: VisibilityScope,
79 pleroma_settings_store: %Schema{
81 description: "Opaque user settings to be saved on the backend."
83 skip_thread_containment: %Schema{
85 description: "Skip filtering out broken threads"
87 allow_following_move: %Schema{
89 description: "Allows automatically follow moved following accounts"
91 pleroma_background_image: %Schema{
93 description: "Sets the background image of the user.",
96 discoverable: %Schema{
98 description: "Discovery of this account in search results and other services is allowed."
100 actor_type: ActorType
104 display_name: "cofe",
106 fields_attributes: [%{name: "foo", value: "bar"}],
108 hide_followers: true,
110 hide_followers_count: false,
111 hide_follows_count: false,
112 hide_favorites: false,
114 default_scope: "private",
115 pleroma_settings_store: %{"pleroma-fe" => %{"key" => "val"}},
116 skip_thread_containment: false,
117 allow_following_move: false,