aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas')
-rw-r--r--lib/pleroma/web/api_spec/schemas/account_relationship.ex (renamed from lib/pleroma/web/api_spec/schemas/account_relationship_response.ex)36
-rw-r--r--lib/pleroma/web/api_spec/schemas/account_relationships_response.ex5
2 files changed, 23 insertions, 18 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/account_relationship_response.ex b/lib/pleroma/web/api_spec/schemas/account_relationship.ex
index 9974b946b..7db3b49bb 100644
--- a/lib/pleroma/web/api_spec/schemas/account_relationship_response.ex
+++ b/lib/pleroma/web/api_spec/schemas/account_relationship.ex
@@ -2,41 +2,43 @@
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationshipResponse do
+defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do
alias OpenApiSpex.Schema
require OpenApiSpex
OpenApiSpex.schema(%{
- title: "AccountRelationshipResponse",
- description: "Response schema for an account relationship",
+ title: "AccountRelationship",
+ description: "Response schema for relationship",
type: :object,
properties: %{
- id: %Schema{type: :string},
- following: %Schema{type: :boolean},
- showing_reblogs: %Schema{type: :boolean},
- followed_by: %Schema{type: :boolean},
- blocking: %Schema{type: :boolean},
blocked_by: %Schema{type: :boolean},
+ blocking: %Schema{type: :boolean},
+ domain_blocking: %Schema{type: :boolean},
+ endorsed: %Schema{type: :boolean},
+ followed_by: %Schema{type: :boolean},
+ following: %Schema{type: :boolean},
+ id: %Schema{type: :string},
muting: %Schema{type: :boolean},
muting_notifications: %Schema{type: :boolean},
requested: %Schema{type: :boolean},
- domain_blocking: %Schema{type: :boolean},
- endorsed: %Schema{type: :boolean}
+ showing_reblogs: %Schema{type: :boolean},
+ subscribing: %Schema{type: :boolean}
},
example: %{
"JSON" => %{
- "id" => "1",
- "following" => true,
- "showing_reblogs" => true,
- "followed_by" => true,
- "blocking" => false,
"blocked_by" => false,
+ "blocking" => false,
+ "domain_blocking" => false,
+ "endorsed" => false,
+ "followed_by" => false,
+ "following" => false,
+ "id" => "9tKi3esbG7OQgZ2920",
"muting" => false,
"muting_notifications" => false,
"requested" => false,
- "domain_blocking" => false,
- "endorsed" => false
+ "showing_reblogs" => true,
+ "subscribing" => false
}
}
})
diff --git a/lib/pleroma/web/api_spec/schemas/account_relationships_response.ex b/lib/pleroma/web/api_spec/schemas/account_relationships_response.ex
index 2ca632310..960e14db1 100644
--- a/lib/pleroma/web/api_spec/schemas/account_relationships_response.ex
+++ b/lib/pleroma/web/api_spec/schemas/account_relationships_response.ex
@@ -9,7 +9,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationshipsResponse do
title: "AccountRelationshipsResponse",
description: "Response schema for account relationships",
type: :array,
- items: Pleroma.Web.ApiSpec.Schemas.AccountRelationshipResponse,
+ items: Pleroma.Web.ApiSpec.Schemas.AccountRelationship,
example: [
%{
"id" => "1",
@@ -22,6 +22,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationshipsResponse do
"muting_notifications" => false,
"requested" => false,
"domain_blocking" => false,
+ "subscribing" => false,
"endorsed" => true
},
%{
@@ -35,6 +36,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationshipsResponse do
"muting_notifications" => false,
"requested" => true,
"domain_blocking" => false,
+ "subscribing" => false,
"endorsed" => false
},
%{
@@ -48,6 +50,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationshipsResponse do
"muting_notifications" => false,
"requested" => false,
"domain_blocking" => true,
+ "subscribing" => true,
"endorsed" => false
}
]