Add spec for AccountController.relationships
[akkoma] / lib / pleroma / web / api_spec / schemas / account_relationships_response.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.AccountRelationshipsResponse do
6 require OpenApiSpex
7
8 OpenApiSpex.schema(%{
9 title: "AccountRelationshipsResponse",
10 description: "Response schema for account relationships",
11 type: :array,
12 items: Pleroma.Web.ApiSpec.Schemas.AccountRelationshipResponse,
13 example: [
14 %{
15 "id" => "1",
16 "following" => true,
17 "showing_reblogs" => true,
18 "followed_by" => true,
19 "blocking" => false,
20 "blocked_by" => true,
21 "muting" => false,
22 "muting_notifications" => false,
23 "requested" => false,
24 "domain_blocking" => false,
25 "endorsed" => true
26 },
27 %{
28 "id" => "2",
29 "following" => true,
30 "showing_reblogs" => true,
31 "followed_by" => true,
32 "blocking" => false,
33 "blocked_by" => true,
34 "muting" => true,
35 "muting_notifications" => false,
36 "requested" => true,
37 "domain_blocking" => false,
38 "endorsed" => false
39 },
40 %{
41 "id" => "3",
42 "following" => true,
43 "showing_reblogs" => true,
44 "followed_by" => true,
45 "blocking" => true,
46 "blocked_by" => false,
47 "muting" => true,
48 "muting_notifications" => false,
49 "requested" => false,
50 "domain_blocking" => true,
51 "endorsed" => false
52 }
53 ]
54 })
55 end