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