f2bd37d399a1bf5bb30eb237889134b3fe6227d9
[akkoma] / lib / pleroma / web / api_spec / schemas / account_relationship.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.AccountRelationship do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "AccountRelationship",
12 description: "Response schema for relationship",
13 type: :object,
14 properties: %{
15 blocked_by: %Schema{type: :boolean},
16 blocking: %Schema{type: :boolean},
17 domain_blocking: %Schema{type: :boolean},
18 endorsed: %Schema{type: :boolean},
19 followed_by: %Schema{type: :boolean},
20 following: %Schema{type: :boolean},
21 id: %Schema{type: :string},
22 muting: %Schema{type: :boolean},
23 muting_notifications: %Schema{type: :boolean},
24 requested: %Schema{type: :boolean},
25 showing_reblogs: %Schema{type: :boolean},
26 subscribing: %Schema{type: :boolean}
27 },
28 example: %{
29 "blocked_by" => false,
30 "blocking" => false,
31 "domain_blocking" => false,
32 "endorsed" => false,
33 "followed_by" => false,
34 "following" => false,
35 "id" => "9tKi3esbG7OQgZ2920",
36 "muting" => false,
37 "muting_notifications" => false,
38 "requested" => false,
39 "showing_reblogs" => true,
40 "subscribing" => false
41 }
42 })
43 end