Commit 350f0286 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'pl-status-page-mvc-json-status' into 'master'

Expose issue state as `status` on status page

See merge request gitlab-org/gitlab!27272
parents 872f0550 8764a223
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module StatusPage module StatusPage
class IncidentEntity < Grape::Entity class IncidentEntity < Grape::Entity
expose :iid, as: :id expose :iid, as: :id
expose :state expose :state, as: :status
expose :title_html, as: :title expose :title_html, as: :title
expose :description_html, as: :description expose :description_html, as: :description
expose :updated_at expose :updated_at
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"type": "object", "type": "object",
"required": [ "required": [
"id", "id",
"state", "status",
"title", "title",
"description", "description",
"links", "links",
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
], ],
"properties": { "properties": {
"id": { "type": "integer" }, "id": { "type": "integer" },
"state": { "status": {
"type": "string", "type": "string",
"enum": ["opened", "closed"] "enum": ["opened", "closed"]
}, },
......
...@@ -14,7 +14,7 @@ describe StatusPage::IncidentEntity do ...@@ -14,7 +14,7 @@ describe StatusPage::IncidentEntity do
it 'exposes JSON fields' do it 'exposes JSON fields' do
expect(json).to eq( expect(json).to eq(
id: issue.iid, id: issue.iid,
state: issue.state, status: issue.state,
title: issue.title_html, title: issue.title_html,
description: issue.description_html, description: issue.description_html,
updated_at: issue.updated_at, updated_at: issue.updated_at,
......
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