summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/schemas/api_error.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas/api_error.ex')
-rw-r--r--lib/pleroma/web/api_spec/schemas/api_error.ex19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/api_error.ex b/lib/pleroma/web/api_spec/schemas/api_error.ex
new file mode 100644
index 000000000..5815df94c
--- /dev/null
+++ b/lib/pleroma/web/api_spec/schemas/api_error.ex
@@ -0,0 +1,19 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ApiSpec.Schemas.ApiError do
+ alias OpenApiSpex.Schema
+
+ require OpenApiSpex
+
+ OpenApiSpex.schema(%{
+ title: "ApiError",
+ description: "Response schema for API error",
+ type: :object,
+ properties: %{error: %Schema{type: :string}},
+ example: %{
+ "error" => "Something went wrong"
+ }
+ })
+end