added API docs
CHANGELOG improved comments in API code improved spec description
This commit is contained in:
parent
828b977214
commit
e241fe6b78
4 changed files with 8 additions and 2 deletions
5
changelogs/unreleased/ide-merge-request-info.yml
Normal file
5
changelogs/unreleased/ide-merge-request-info.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Display merge request title & description in Web IDE
|
||||
merge_request:
|
||||
author:
|
||||
type: added
|
|
@ -358,6 +358,7 @@ Parameters:
|
|||
|
||||
- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
|
||||
- `merge_request_iid` (required) - The internal ID of the merge request
|
||||
- `render_html` (optional) - If `true` response includes rendered HTML for title and description
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -232,7 +232,7 @@ module API
|
|||
|
||||
params do
|
||||
requires :merge_request_iid, type: Integer, desc: 'The IID of a merge request'
|
||||
optional :render_html, type: Boolean, desc: 'Returns the description and title rendered html'
|
||||
optional :render_html, type: Boolean, desc: 'Returns the description and title rendered HTML'
|
||||
end
|
||||
desc 'Get a single merge request' do
|
||||
success Entities::MergeRequest
|
||||
|
|
|
@ -306,7 +306,7 @@ describe API::MergeRequests do
|
|||
expect(json_response['changes_count']).to eq(merge_request.merge_request_diff.real_size)
|
||||
end
|
||||
|
||||
it 'exposes description and title html' do
|
||||
it 'exposes description and title html when render_html is true' do
|
||||
get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), render_html: true
|
||||
|
||||
expect(response).to have_gitlab_http_status(200)
|
||||
|
|
Loading…
Reference in a new issue