diff options
author | rinpatch <rinpatch@sdf.org> | 2020-04-28 11:57:16 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-04-28 11:57:16 +0000 |
commit | 12bb7fc0dc94068d8337f10fc337ab23c8c7e77e (patch) | |
tree | db22ab2a17bad9edc35734596b098a8bd3f0195b /lib/pleroma/web/api_spec/schemas/api_error.ex | |
parent | 9994768312ede572c4ddd6beda7027b0a2baddce (diff) | |
parent | dda65f7799e9dfa2e7b87389848eeee10993a858 (diff) | |
download | pleroma-12bb7fc0dc94068d8337f10fc337ab23c8c7e77e.tar.gz |
Merge branch 'openapi/account' into 'develop'
Add OpenAPI specs for AccountController
See merge request pleroma/pleroma!2374
Diffstat (limited to 'lib/pleroma/web/api_spec/schemas/api_error.ex')
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/api_error.ex | 19 |
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 |