Commit 69096ad9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Update merge request versions API to match styleguide

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9a5f4087
......@@ -903,11 +903,16 @@ Get a list of merge request diff versions.
GET /projects/:id/merge_requests/:merge_request_id/versions
```
Parameters:
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project |
| `merge_request_id` | integer | yes | The ID of the merge request |
- `id` (required) - The ID of a project
- `merge_request_id` (required) - The ID of MR
```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions
```
Example response:
```json
[{
......
......@@ -4,15 +4,16 @@ module API
before { authenticate! }
resource :projects do
# List merge requests diff versions
#
# Parameters:
# id (required) - The ID of a project
# merge_request_id (required) - The ID of MR
#
# Example:
# GET /projects/:id/merge_requests/:merge_request_id/versions
#
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: Integer, desc: 'The ID of a project'
requests :merge_request_id, type: Integer, desc: 'The ID of a merge request'
end
get ":id/merge_requests/:merge_request_id/versions" do
merge_request = user_project.merge_requests.
find(params[:merge_request_id])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment