From 04a11c8894f9c4f9ea95bbc699d98a1fee9ee8bd Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Sat, 24 Aug 2019 06:24:59 +0000 Subject: [PATCH] Put parameters related to keyword directly after it Signed-off-by: David Svantesson --- routers/api/v1/repo/repo.go | 8 ++++---- templates/swagger/v1_json.tmpl | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index d57ff9703212a..eccff8c3873cc 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -55,6 +55,10 @@ func Search(ctx *context.APIContext) { // in: query // description: Limit search to repositories with keyword as topic // type: boolean + // - name: includeDesc + // in: query + // description: include search of keyword within repository description + // type: boolean // - name: uid // in: query // description: search only for repos that the user with the given id owns or contributes to @@ -97,10 +101,6 @@ func Search(ctx *context.APIContext) { // description: sort order, either "asc" (ascending) or "desc" (descending). // Default is "asc", ignored if "sort" is not specified. // type: string - // - name: includeDesc - // in: query - // description: include search of keyword within repository description - // type: boolean // responses: // "200": // "$ref": "#/responses/SearchResults" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 1881ce6e41088..64fce4a9f54b8 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1099,6 +1099,12 @@ "name": "topic", "in": "query" }, + { + "type": "boolean", + "description": "include search of keyword within repository description", + "name": "includeDesc", + "in": "query" + }, { "type": "integer", "format": "int64", @@ -1154,12 +1160,6 @@ "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.", "name": "order", "in": "query" - }, - { - "type": "boolean", - "description": "include search of keyword within repository description", - "name": "includeDesc", - "in": "query" } ], "responses": {