summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-02-07 14:20:18 +0100
committerJarka Kadlecová <jarka@gitlab.com>2018-02-07 14:20:18 +0100
commit86e98c832a4eeaac616daef4ef9ddebeb7191fdd (patch)
tree493e74c9fb795c719445310b656d2d4d6672ed9c
parentf170913d734b2151761bb186856928425419155a (diff)
downloadgitlab-ce-41763-search-api.tar.gz
Small code/doc changes41763-search-api
-rw-r--r--doc/api/search.md8
-rw-r--r--lib/api/search.rb18
2 files changed, 16 insertions, 10 deletions
diff --git a/doc/api/search.md b/doc/api/search.md
index 648c146cabc..1fba9c3fbb8 100644
--- a/doc/api/search.md
+++ b/doc/api/search.md
@@ -17,7 +17,7 @@ GET /search
| `scope` | string | yes | The scope to search in |
| `search` | string | yes | The search query |
-Search the expression within the specified scope. Currentyly these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs.
+Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs.
The response depends on the requested scope.
@@ -298,7 +298,7 @@ GET /groups/:id/-/search
| `scope` | string | yes | The scope to search in |
| `search` | string | yes | The search query |
-Search the expression within the specified scope. Currentyly these scopes are supported: projects, issues, merge_requests, milestones.
+Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones.
The response depends on the requested scope.
@@ -512,11 +512,11 @@ GET /projects/:id/-/search
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
-| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `scope` | string | yes | The scope to search in |
| `search` | string | yes | The search query |
-Search the expression within the specified scope. Currentyly these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs.
+Search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs.
The response depends on the requested scope.
diff --git a/lib/api/search.rb b/lib/api/search.rb
index 3912c66657e..9f08fd96a3b 100644
--- a/lib/api/search.rb
+++ b/lib/api/search.rb
@@ -58,8 +58,10 @@ module API
end
params do
requires :search, type: String, desc: 'The expression it should be searched for'
- requires :scope, type: String, desc: 'The scope of search, available scopes:
- projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs',
+ requires :scope,
+ type: String,
+ desc: 'The scope of search, available scopes:
+ projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs',
values: %w(projects issues merge_requests milestones snippet_titles snippet_blobs)
use :pagination
end
@@ -75,8 +77,10 @@ module API
params do
requires :id, type: String, desc: 'The ID of a group'
requires :search, type: String, desc: 'The expression it should be searched for'
- requires :scope, type: String, desc: 'The scope of search, available scopes:
- projects, issues, merge_requests, milestones',
+ requires :scope,
+ type: String,
+ desc: 'The scope of search, available scopes:
+ projects, issues, merge_requests, milestones',
values: %w(projects issues merge_requests milestones)
use :pagination
end
@@ -94,8 +98,10 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
requires :search, type: String, desc: 'The expression it should be searched for'
- requires :scope, type: String, desc: 'The scope of search, available scopes:
- issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs',
+ requires :scope,
+ type: String,
+ desc: 'The scope of search, available scopes:
+ issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs',
values: %w(issues merge_requests milestones notes wiki_blobs commits blobs)
use :pagination
end