1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.PleromaInstancesOperation do
6 alias OpenApiSpex.Operation
7 alias OpenApiSpex.Schema
9 def open_api_operation(action) do
10 operation = String.to_existing_atom("#{action}_operation")
11 apply(__MODULE__, operation, [])
16 tags: ["PleromaInstances"],
17 summary: "Instances federation status",
18 description: "Information about instances deemed unreachable by the server",
19 operationId: "PleromaInstances.show",
21 200 => Operation.response("PleromaInstances", "application/json", pleroma_instances())
26 def pleroma_instances do
32 properties: %{hostname: %Schema{type: :string, format: :"date-time"}}
36 "unreachable" => %{"consistently-unreachable.name" => "2020-10-14 22:07:58.216473"}