move to 2.5.5
[anni] / lib / pleroma / web / api_spec / schemas / account_relationship.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do
6   alias OpenApiSpex.Schema
7   alias Pleroma.Web.ApiSpec.Schemas.FlakeID
8
9   require OpenApiSpex
10
11   OpenApiSpex.schema(%{
12     title: "AccountRelationship",
13     description: "Relationship between current account and requested account",
14     type: :object,
15     properties: %{
16       blocked_by: %Schema{type: :boolean},
17       blocking: %Schema{type: :boolean},
18       domain_blocking: %Schema{type: :boolean},
19       endorsed: %Schema{type: :boolean},
20       followed_by: %Schema{type: :boolean},
21       following: %Schema{type: :boolean},
22       id: FlakeID,
23       muting: %Schema{type: :boolean},
24       muting_notifications: %Schema{type: :boolean},
25       note: %Schema{type: :string},
26       requested: %Schema{type: :boolean},
27       showing_reblogs: %Schema{type: :boolean},
28       subscribing: %Schema{type: :boolean},
29       notifying: %Schema{type: :boolean}
30     },
31     example: %{
32       "blocked_by" => false,
33       "blocking" => false,
34       "domain_blocking" => false,
35       "endorsed" => false,
36       "followed_by" => false,
37       "following" => false,
38       "id" => "9tKi3esbG7OQgZ2920",
39       "muting" => false,
40       "muting_notifications" => false,
41       "note" => "",
42       "requested" => false,
43       "showing_reblogs" => true,
44       "subscribing" => false,
45       "notifying" => false
46     }
47   })
48 end