response fields mismatch in merge requests API and its documentation
in merge requests api (https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr) documentation it is given
"author": {
"id": 1,
"username": "admin",
"email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"assignee": {
"id": 1,
"username": "admin",
"email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
but what we will get as output will be
"author": {
"id": 1,
"name": "Administrator",
"username": "admin",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/60ab819da95dc2f014185e62551c7ab8?s=80&d=identicon",
"web_url": "http://localhost:3000/admin"
},
"assignee": {
"id": 1,
"name": "Administrator",
"username": "admin",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/60ab819da95dc2f014185e62551c7ab8?s=80&d=identicon",
"web_url": "http://localhost:3000/admin" },
this is because in mergerequests API it is defined as
expose :author, :assignee, using: Entities::UserBasic
but the UserBasic
is defined to include the fields id
name
username
state
avatar_url
and web_url
only.
Edited by haseeb