Pleroma/lib/pleroma/web/api_spec/schemas/api_error.ex

20 lines
497 B
Elixir
Raw Normal View History

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