summaryrefslogtreecommitdiff
path: root/spec/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade to Rails 5.2upgrade-rails-5-2-ceHeinrich Lee Yu2019-07-121-5/+5
| | | | Updates changed method names and fixes spec failures
* Include the port in the URLs of the API Link headersRémy Coutable2019-06-061-15/+19
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use a path for the related merge requests endpointsh-fix-related-merge-requests-pathStan Hu2019-05-071-0/+34
| | | | | | | | | | Hosts using a non-standard configuration may have a different hostname/port/scheme than what may be configured on the GitLab server. While expose_url should generate a proper URL, there are cases where it may not work. Since we don't need the full URL, we can use the relative path. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61280
* Get rid of the user_namespace API helper methodRémy Coutable2019-04-241-12/+0
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Autocorrect with RSpec/ExampleWording copThong Kuah2019-04-051-3/+3
| | | | | | | - rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
* Add port section to CI Image objectFrancisco Javier López2019-04-032-0/+53
| | | | | | | | | | | In order to implement https://gitlab.com/gitlab-org/gitlab-ee/issues/10179 we need several modifications on the CI config file. We are adding a new ports section in the default Image object. Each of these ports will accept: number, protocol and name. By default this new configuration will be only enabled in the Web IDE config file.
* Provide EE backports for filtering by approver featureIgor2019-03-071-0/+23
| | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"Igor2019-03-071-23/+0
| | | | This reverts merge request !24982
* Provide EE backports for filtering by approver featureIgor2019-03-071-0/+23
| | | | | Adds custom validator for ArrayNoneAny param Extracts some logic in js into separate files
* Properly implement API pagination headers and add specsAdam Mulvany2019-02-211-91/+64
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Encode Content-Disposition filenamesStan Hu2019-02-041-1/+1
| | | | | | | | | | | | | Users downloading non-ASCII attachments would see garbled characters. When used with object storage, AWS S3 would return an InvalidArgument error: Header value cannot be represented using ISO-8859-1. Per RFC 5987 and RFC 6266, Content-Disposition should be encoded properly. This commit takes the Rails 6 implementation of ActiveSuppport::Http::ContentDisposition (https://github.com/rails/rails/pull/33829) and ports it here. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/47673
* [API] Omit X-Total{,-Pages} when count > 10kRémy Coutable2019-01-221-15/+82
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix files/blob api endpoint content dispositionFrancisco Javier López2019-01-101-14/+18
|
* Improve readablity of CI_API_V4_URL related codeGrzegorz Bizon2019-01-041-1/+1
|
* Add API::Helpers::Version and expose API root URLGrzegorz Bizon2019-01-032-16/+27
| | | | | This commits adds a new class that is supposed to represent Grape API version, like `v3` or `v4`.
* Expose method that returns GitLab API pathsGrzegorz Bizon2019-01-031-0/+36
|
* Fixed api content-disposition in blob and files endpointFrancisco Javier López2018-12-311-0/+32
|
* Support lowercase none / anyHeinrich Lee Yu2018-10-261-0/+2
|
* Refactor api validator to separate classHeinrich Lee Yu2018-10-261-0/+62
|
* Include private contributions in user contribution graphGeorge Tsiolis2018-09-071-1/+1
|
* Merge branch 'ab-42194-keyset-pagination' into 'master'Yorick Peterse2018-05-221-8/+204
|\ | | | | | | | | | | | | API: Keyset pagination support Closes #45756 See merge request gitlab-org/gitlab-ce!18584
| * Add keyset pagination for API calls.Andreas Brandl2018-05-211-8/+204
| | | | | | | | Closes #45756.
* | Fix `expose_url` helper does not include custom base url if it is setFrancisco Javier López2018-05-221-2/+14
|/
* Validate project path prior to hitting the database.Andreas Brandl2018-04-131-0/+42
| | | | Closes #45247.
* Respect the protocol in `expose_url`Toon Claes2018-03-121-0/+41
| | | | | | | When https is configured in the URL, also use that, and do not set it to http. Closes gitlab-org/gitlab-ee#5217
* Added default order to UserFinderFrancisco Javier López2017-12-041-0/+21
|
* Add some unit tests for lib/api/helpers.rbTomasz Maczukin2017-11-271-0/+109
|
* Total Pages should be at least onetc-git-tower-pagination-linksToon Claes2017-08-171-1/+2
| | | | And the link to the last page cannot be `page=0`.
* Add specs for pagination Link headerToon Claes2017-08-171-4/+47
| | | | | | | | | | | | | Add specs that check the 'Link' header for the inclusion of: - rel="first" - rel="last" - rel="prev" - rel="next" Fixes gitlab-org/gitlab-ce#36618 Related to gitlab-com/infrastructure#2532
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-1/+1
|
* Add tests for pagination module extracted from APIGrzegorz Bizon2016-12-271-0/+94