diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-22 20:18:12 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-22 20:18:12 +0400 |
commit | 6c26feed01b2e836e7ebdefe9683ddb03cb57757 (patch) | |
tree | 4b143a6708d405e5fc6ebf69910c9ae18066502b /lib/pleroma/web/api_spec/operations | |
parent | 11433cd38d9761ddf3fdb94f8c39526910b975c1 (diff) | |
parent | 28f8fcf8b034223209ec451d0c2c836124ec93f4 (diff) | |
download | pleroma-6c26feed01b2e836e7ebdefe9683ddb03cb57757.tar.gz |
Merge branch 'develop' into openapi/account
Diffstat (limited to 'lib/pleroma/web/api_spec/operations')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/account_operation.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index d3cebaf05..fcf030037 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -298,7 +298,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do security: [%{"oAuth" => ["follow", "write:follows"]}], requestBody: request_body("Parameters", AccountFollowsRequest, required: true), responses: %{ - 200 => Operation.response("Account", "application/json", Account) + 200 => Operation.response("Account", "application/json", AccountRelationship) } } end diff --git a/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex b/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex new file mode 100644 index 000000000..cf2215823 --- /dev/null +++ b/lib/pleroma/web/api_spec/operations/custom_emoji_operation.ex @@ -0,0 +1,25 @@ +# 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.CustomEmojiOperation do + alias OpenApiSpex.Operation + alias Pleroma.Web.ApiSpec.Schemas.CustomEmojisResponse + + def open_api_operation(action) do + operation = String.to_existing_atom("#{action}_operation") + apply(__MODULE__, operation, []) + end + + def index_operation do + %Operation{ + tags: ["custom_emojis"], + summary: "List custom custom emojis", + description: "Returns custom emojis that are available on the server.", + operationId: "CustomEmojiController.index", + responses: %{ + 200 => Operation.response("Custom Emojis", "application/json", CustomEmojisResponse) + } + } + end +end |