2020-04-07 16:29:05 +02:00
|
|
|
# Pleroma: A lightweight social networking server
|
|
|
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-04-09 13:25:24 +02:00
|
|
|
defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do
|
2020-04-07 16:29:05 +02:00
|
|
|
alias OpenApiSpex.Schema
|
|
|
|
|
|
|
|
require OpenApiSpex
|
|
|
|
|
|
|
|
OpenApiSpex.schema(%{
|
2020-04-09 13:25:24 +02:00
|
|
|
title: "AccountRelationship",
|
|
|
|
description: "Response schema for relationship",
|
2020-04-07 16:29:05 +02:00
|
|
|
type: :object,
|
|
|
|
properties: %{
|
|
|
|
blocked_by: %Schema{type: :boolean},
|
2020-04-09 13:25:24 +02:00
|
|
|
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},
|
2020-04-07 16:29:05 +02:00
|
|
|
muting: %Schema{type: :boolean},
|
|
|
|
muting_notifications: %Schema{type: :boolean},
|
|
|
|
requested: %Schema{type: :boolean},
|
2020-04-09 13:25:24 +02:00
|
|
|
showing_reblogs: %Schema{type: :boolean},
|
|
|
|
subscribing: %Schema{type: :boolean}
|
2020-04-07 16:29:05 +02:00
|
|
|
},
|
|
|
|
example: %{
|
|
|
|
"JSON" => %{
|
|
|
|
"blocked_by" => false,
|
2020-04-09 13:25:24 +02:00
|
|
|
"blocking" => false,
|
|
|
|
"domain_blocking" => false,
|
|
|
|
"endorsed" => false,
|
|
|
|
"followed_by" => false,
|
|
|
|
"following" => false,
|
|
|
|
"id" => "9tKi3esbG7OQgZ2920",
|
2020-04-07 16:29:05 +02:00
|
|
|
"muting" => false,
|
|
|
|
"muting_notifications" => false,
|
|
|
|
"requested" => false,
|
2020-04-09 13:25:24 +02:00
|
|
|
"showing_reblogs" => true,
|
|
|
|
"subscribing" => false
|
2020-04-07 16:29:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|