Add search mode option to /api/repo/search (#2756)
* Add repo type option to /api/repo/search * Add tests and fix result of collaborative filter in specific condition * Fix/optimize search & tests * Improve integration tests * Fix lint errors * Fix unit tests * Change and improve internal implementation of repo search * Use NonexistentID * Make search api more general * Change mirror and fork search behaviour * Fix tests & typo in comment
This commit is contained in:
parent
4d01ecaef3
commit
ddb7f59ef4
16 changed files with 502 additions and 139 deletions
19
public/swagger.v1.json
vendored
19
public/swagger.v1.json
vendored
|
@ -1102,7 +1102,7 @@
|
|||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "OwnerID",
|
||||
"description": "Owner in we search search",
|
||||
"description": "Repository owner to search",
|
||||
"name": "uid",
|
||||
"in": "query"
|
||||
},
|
||||
|
@ -1113,12 +1113,29 @@
|
|||
"description": "Limit of result\n\nmaximum: setting.ExplorePagingNum",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"x-go-name": "SearchMode",
|
||||
"description": "Type of repository to search, related to owner",
|
||||
"name": "mode",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"x-go-name": "OwnerExclusive",
|
||||
"description": "Search only owners repositories\nHas effect only if owner is provided and mode is not \"collaborative\"",
|
||||
"name": "exclusive",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/SearchResults"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/responses/SearchError"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue