diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2017-05-02 15:35:59 +0200 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-05-02 15:35:59 +0200 |
commit | 3edb0c58943c003ed3f209b2197d1f43484a3432 (patch) | |
tree | e5849cead5053ab505a2c5dc1342111c6bcf0816 /models/repo_list.go | |
parent | bb5f694fc57c3ade9c13e841b9a237f4e192da22 (diff) | |
download | gitea-3edb0c58943c003ed3f209b2197d1f43484a3432.tar.gz gitea-3edb0c58943c003ed3f209b2197d1f43484a3432.zip |
Generate swagger json (#1402)
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
Diffstat (limited to 'models/repo_list.go')
-rw-r--r-- | models/repo_list.go | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/models/repo_list.go b/models/repo_list.go index b7e314e707..0c27281f17 100644 --- a/models/repo_list.go +++ b/models/repo_list.go @@ -84,16 +84,27 @@ func (repos MirrorRepositoryList) LoadAttributes() error { } // SearchRepoOptions holds the search options +// swagger:parameters repoSearch type SearchRepoOptions struct { - Keyword string - OwnerID int64 - Searcher *User //ID of the person who's seeking - OrderBy string - Private bool // Include private repositories in results - Starred bool - Page int - IsProfile bool - PageSize int // Can be smaller than or equal to setting.ExplorePagingNum + // Keyword to search + // + // in: query + Keyword string `json:"q"` + // Owner in we search search + // + // in: query + OwnerID int64 `json:"uid"` + Searcher *User `json:"-"` //ID of the person who's seeking + OrderBy string `json:"-"` + Private bool `json:"-"` // Include private repositories in results + Starred bool `json:"-"` + Page int `json:"-"` + IsProfile bool `json:"-"` + // Limit of result + // + // maximum: setting.ExplorePagingNum + // in: query + PageSize int `json:"limit"` // Can be smaller than or equal to setting.ExplorePagingNum } // SearchRepositoryByName takes keyword and part of repository name to search, |