2020-04-08 21:51:46 +02:00
|
|
|
# Pleroma: A lightweight social networking server
|
2021-01-13 07:49:20 +01:00
|
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
2020-04-08 21:51:46 +02:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-04-27 20:55:05 +02:00
|
|
|
defmodule Pleroma.Web.ApiSpec.Schemas.ApiError do
|
2020-04-08 21:51:46 +02:00
|
|
|
alias OpenApiSpex.Schema
|
|
|
|
|
|
|
|
require OpenApiSpex
|
|
|
|
|
|
|
|
OpenApiSpex.schema(%{
|
2020-04-27 20:55:05 +02:00
|
|
|
title: "ApiError",
|
|
|
|
description: "Response schema for API error",
|
2020-04-08 21:51:46 +02:00
|
|
|
type: :object,
|
2020-04-27 20:55:05 +02:00
|
|
|
properties: %{error: %Schema{type: :string}},
|
2020-04-08 21:51:46 +02:00
|
|
|
example: %{
|
2020-04-27 20:55:05 +02:00
|
|
|
"error" => "Something went wrong"
|
2020-04-08 21:51:46 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|