Feature - Pagination for git tree API (#5838)

* Feature - Pagination for git tree API

* Handles case when page is negative

* Does a for loop over the start and end rather than all entries

* Removed redundent logic

* Adds per_page as a query parameter

* Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt

* Fix typo in cheat-sheet en

* Makes page start at 1, generated swagger

* Use updates to SDK

* Updates to use latest sdk

* Updates swagger for tree api

* Adds test for GetTreeBySHA

* Updates per PR reviews

* Updates per PR reviews

* Remove file

* Formatting

* Fix to swagger file

* Fix to swagger

* Update v1_json.tmpl

* Fix to swagger file
This commit is contained in:
Richard Mahn
2019-02-06 11:19:26 -07:00
committed by zeripath
parent 0c840a924a
commit da1edbfb79
9 changed files with 145 additions and 31 deletions

View File

@ -561,13 +561,15 @@ var (
// API settings
API = struct {
EnableSwagger bool
MaxResponseItems int
DefaultPagingNum int
EnableSwagger bool
MaxResponseItems int
DefaultPagingNum int
DefaultGitTreesPerPage int
}{
EnableSwagger: true,
MaxResponseItems: 50,
DefaultPagingNum: 30,
EnableSwagger: true,
MaxResponseItems: 50,
DefaultPagingNum: 30,
DefaultGitTreesPerPage: 1000,
}
U2F = struct {