Return Issue#iid instead of id when listing issues

This commit is contained in:
Douglas Barbosa Alexandre 2016-08-04 13:59:30 -03:00
parent c14ac83575
commit a8b2d7f380
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@ class Projects::BoardIssuesController < Projects::ApplicationController
issues = Boards::Issues::ListService.new(project, current_user, filter_params).execute issues = Boards::Issues::ListService.new(project, current_user, filter_params).execute
issues = issues.page(params[:page]) issues = issues.page(params[:page])
render json: issues.as_json(only: [:id, :title, :confidential], include: { labels: { only: [:id, :title, :color] } }) render json: issues.as_json(only: [:iid, :title, :confidential], include: { labels: { only: [:id, :title, :color] } })
end end
def update def update

View file

@ -1,12 +1,12 @@
{ {
"type": "object", "type": "object",
"required" : [ "required" : [
"id", "iid",
"title", "title",
"confidential" "confidential"
], ],
"properties" : { "properties" : {
"id": { "type": "integer" }, "iid": { "type": "integer" },
"title": { "type": "string" }, "title": { "type": "string" },
"confidential": { "type": "boolean" }, "confidential": { "type": "boolean" },
"labels": { "labels": {