Skip to content

Add swagger documentation for limiting API repository search to topics only #7957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions routers/api/v1/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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
Expand Down
6 changes: 6 additions & 0 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down