From da1edbfb79566e9d31f43ee85eb2e9fc9b52695b Mon Sep 17 00:00:00 2001 From: Richard Mahn Date: Wed, 6 Feb 2019 11:19:26 -0700 Subject: 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 --- custom/conf/app.ini.sample | 2 ++ 1 file changed, 2 insertions(+) (limited to 'custom') diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample index 31fed0c022..126f2a8485 100644 --- a/custom/conf/app.ini.sample +++ b/custom/conf/app.ini.sample @@ -629,6 +629,8 @@ ENABLE_SWAGGER = true MAX_RESPONSE_ITEMS = 50 ; Default paging number of api DEFAULT_PAGING_NUM = 30 +; Default and maximum number of items per page for git trees api +DEFAULT_GIT_TREES_PER_PAGE = 1000 [i18n] LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR -- cgit v1.2.3