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