diff options
author | Sean McGivern <sean@gitlab.com> | 2019-08-06 17:27:46 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-08-08 17:10:41 +0100 |
commit | e6dc5168b86d613e3334fa55618e394308bf55bf (patch) | |
tree | 6ad67848dfbe81949474e20f5224edf055c273cb /lib/api/labels.rb | |
parent | 26087322713e2949f2bf207798512374757a484c (diff) | |
download | gitlab-ce-e6dc5168b86d613e3334fa55618e394308bf55bf.tar.gz |
Remove label issue and MR counts from default API responsesspeed-up-labels-api
These counts significantly increase the load time for these
requests. Users can now opt in to receiving the counts by setting
`with_counts=true` in requests. This is a breaking change, but hopefully
a fairly minor one.
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r-- | lib/api/labels.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index d729d3ee625..c183198d3c6 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -15,6 +15,8 @@ module API success Entities::ProjectLabel end params do + optional :with_counts, type: Boolean, default: false, + desc: 'Include issue and merge request counts' use :pagination end get ':id/labels' do |