2020-04-08 19:51:46 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
|
|
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
|
|
|
# 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
|