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