diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-15 21:09:24 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-16 20:00:24 +0300 |
commit | 63360adeae3ba5b302b711c73b6439956d274cde (patch) | |
tree | f547b1bc271a1b9c0f8df616cfb1fb5c2574c43a /lib/api/merge_request_diffs.rb | |
parent | c9abdadd7a08f972d5a12472f9f5ac443e37a6ac (diff) |
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/merge_request_diffs.rb')
-rw-r--r-- | lib/api/merge_request_diffs.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/merge_request_diffs.rb b/lib/api/merge_request_diffs.rb index a59e39cca26..4b79eac2b8b 100644 --- a/lib/api/merge_request_diffs.rb +++ b/lib/api/merge_request_diffs.rb @@ -5,14 +5,16 @@ module API before { authenticate! } - resource :projects do + params do + requires :id, type: String, desc: 'The ID of a project' + end + resource :projects, requirements: { id: %r{[^/]+} } do desc 'Get a list of merge request diff versions' do detail 'This feature was introduced in GitLab 8.12.' success Entities::MergeRequestDiff end params do - requires :id, type: String, desc: 'The ID of a project' requires :merge_request_iid, type: Integer, desc: 'The IID of a merge request' use :pagination end @@ -28,7 +30,6 @@ module API end params do - requires :id, type: String, desc: 'The ID of a project' requires :merge_request_iid, type: Integer, desc: 'The IID of a merge request' requires :version_id, type: Integer, desc: 'The ID of a merge request diff version' end |