From f255ee0c4a16e04907ed99fa4bb8480b2a38acd0 Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Fri, 23 Aug 2019 22:07:10 +0200 Subject: [PATCH] Document possibility to limit API Repo search to topics only. Signed-off-by: David Svantesson --- routers/api/v1/repo/repo.go | 4 ++++ templates/swagger/v1_json.tmpl | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 8d7e43edff8cf..0a557b6c62b15 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -52,6 +52,10 @@ func Search(ctx *context.APIContext) { // in: query // description: keyword // type: string + // - name: topic + // in: query + // description: Limit search to repositories with keyword as topic + // type: boolean // - name: uid // in: query // description: search only for repos that the user with the given id owns or contributes to diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 2d5f8c5c9c253..ee053456977a8 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1093,6 +1093,12 @@ "name": "q", "in": "query" }, + { + "type": "boolean", + "description": "Limit search to repositories with keyword as topic", + "name": "topic", + "in": "query" + }, { "type": "integer", "format": "int64",