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. ...@@ -903,11 +903,16 @@ Get a list of merge request diff versions.
GET /projects/:id/merge_requests/:merge_request_id/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 ```bash
- `merge_request_id` (required) - The ID of MR curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions
```
Example response:
```json ```json
[{ [{
......
...@@ -4,15 +4,16 @@ module API ...@@ -4,15 +4,16 @@ module API
before { authenticate! } before { authenticate! }
resource :projects do resource :projects do
# List merge requests diff versions desc 'Get a list of merge request diff versions' do
# detail 'This feature was introduced in GitLab 8.12.'
# Parameters: success Entities::MergeRequestDiff
# id (required) - The ID of a project end
# merge_request_id (required) - The ID of MR
# params do
# Example: requires :id, type: Integer, desc: 'The ID of a project'
# GET /projects/:id/merge_requests/:merge_request_id/versions requests :merge_request_id, type: Integer, desc: 'The ID of a merge request'
# end
get ":id/merge_requests/:merge_request_id/versions" do get ":id/merge_requests/:merge_request_id/versions" do
merge_request = user_project.merge_requests. merge_request = user_project.merge_requests.
find(params[:merge_request_id]) 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