X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Foperations%2Fsearch_operation.ex;h=f90c548536c1b64a880ca2cc19c3b52a50f53b9a;hb=a079ec3a3cdfd42d2cbd51c7698c2c87828e5778;hp=169c36d879c1351d1338057ffe9ff291f73e67c8;hpb=283fb1e05bcd34294ea7bdedab62b0cc6f88d742;p=akkoma
diff --git a/lib/pleroma/web/api_spec/operations/search_operation.ex b/lib/pleroma/web/api_spec/operations/search_operation.ex
index 169c36d87..f90c54853 100644
--- a/lib/pleroma/web/api_spec/operations/search_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/search_operation.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.SearchOperation do
@@ -59,53 +59,6 @@ defmodule Pleroma.Web.ApiSpec.SearchOperation do
}
end
- def search_operation do
- %Operation{
- tags: ["Search"],
- summary: "Search results",
- security: [%{"oAuth" => ["read:search"]}],
- operationId: "SearchController.search",
- deprecated: true,
- parameters: [
- Operation.parameter(
- :account_id,
- :query,
- FlakeID,
- "If provided, statuses returned will be authored only by this account"
- ),
- Operation.parameter(
- :type,
- :query,
- %Schema{type: :string, enum: ["accounts", "hashtags", "statuses"]},
- "Search type"
- ),
- Operation.parameter(:q, :query, %Schema{type: :string}, "The search query", required: true),
- Operation.parameter(
- :resolve,
- :query,
- %Schema{allOf: [BooleanLike], default: false},
- "Attempt WebFinger lookup"
- ),
- Operation.parameter(
- :following,
- :query,
- %Schema{allOf: [BooleanLike], default: false},
- "Only include accounts that the user is following"
- ),
- Operation.parameter(
- :offset,
- :query,
- %Schema{type: :integer},
- "Offset"
- ),
- with_relationships_param() | pagination_params()
- ],
- responses: %{
- 200 => Operation.response("Results", "application/json", results())
- }
- }
- end
-
def search2_operation do
%Operation{
tags: ["Search"],
@@ -176,33 +129,4 @@ defmodule Pleroma.Web.ApiSpec.SearchOperation do
}
}
end
-
- defp results do
- %Schema{
- title: "SearchResults",
- type: :object,
- properties: %{
- accounts: %Schema{
- type: :array,
- items: Account,
- description: "Accounts which match the given query"
- },
- statuses: %Schema{
- type: :array,
- items: Status,
- description: "Statuses which match the given query"
- },
- hashtags: %Schema{
- type: :array,
- items: %Schema{type: :string},
- description: "Hashtags which match the given query"
- }
- },
- example: %{
- "accounts" => [Account.schema().example],
- "statuses" => [Status.schema().example],
- "hashtags" => ["cofe"]
- }
- }
- end
end