Skip to content

Commit 482b717

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 66e4c17 of spec repo
1 parent 92dec36 commit 482b717

22 files changed

Lines changed: 2099 additions & 16 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 446 additions & 0 deletions
Large diffs are not rendered by default.

features/v2/given.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,22 @@
602602
"key": "incident_impact",
603603
"tag": "Incidents"
604604
},
605+
{
606+
"parameters": [
607+
{
608+
"name": "incident_id",
609+
"source": "incident.data.id"
610+
},
611+
{
612+
"name": "body",
613+
"value": "{\n \"data\": {\n \"type\": \"incident_postmortems\",\n \"attributes\": {\n \"title\": \"Postmortem for {{ unique }}\",\n \"document_url\": \"https://docs.example.com/postmortem-{{ unique_lower }}\"\n }\n }\n}"
614+
}
615+
],
616+
"step": "there is a valid \"postmortem\" in the system",
617+
"key": "postmortem",
618+
"tag": "Incidents",
619+
"operationId": "CreateIncidentPostmortem"
620+
},
605621
{
606622
"parameters": [
607623
{

features/v2/incidents.feature

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,45 @@ Feature: Incidents
314314
When the request is sent
315315
Then the response status is 201 Created
316316

317+
@generated @skip @team:DataDog/incident-app
318+
Scenario: Create postmortem for an incident returns "Bad Request" response
319+
Given operation "CreateIncidentPostmortem" enabled
320+
And new "CreateIncidentPostmortem" request
321+
And request contains "incident_id" parameter from "REPLACE.ME"
322+
And body with value {"data": {"attributes": {"document_url": "https://app.datadoghq.com/notebook/123", "title": "Postmortem for IR-123"}, "type": "incident_postmortems"}}
323+
When the request is sent
324+
Then the response status is 400 Bad Request
325+
326+
@team:DataDog/incident-app
327+
Scenario: Create postmortem for an incident returns "CREATED" response
328+
Given operation "CreateIncidentPostmortem" enabled
329+
And there is a valid "incident" in the system
330+
And new "CreateIncidentPostmortem" request
331+
And request contains "incident_id" parameter from "incident.data.id"
332+
And body with value {"data": {"attributes": {"document_url": "https://app.datadoghq.com/notebook/123", "title": "Postmortem for IR-123"}, "type": "incident_postmortems"}}
333+
When the request is sent
334+
Then the response status is 201 CREATED
335+
And the response "data.type" is equal to "incident_postmortems"
336+
And the response "data.relationships.incident.data.id" has the same value as "incident.data.id"
337+
338+
@generated @skip @team:DataDog/incident-app
339+
Scenario: Create postmortem for an incident returns "Conflict" response
340+
Given operation "CreateIncidentPostmortem" enabled
341+
And new "CreateIncidentPostmortem" request
342+
And request contains "incident_id" parameter from "REPLACE.ME"
343+
And body with value {"data": {"attributes": {"document_url": "https://app.datadoghq.com/notebook/123", "title": "Postmortem for IR-123"}, "type": "incident_postmortems"}}
344+
When the request is sent
345+
Then the response status is 409 Conflict
346+
347+
@generated @skip @team:DataDog/incident-app
348+
Scenario: Create postmortem for an incident returns "Not Found" response
349+
Given operation "CreateIncidentPostmortem" enabled
350+
And new "CreateIncidentPostmortem" request
351+
And request contains "incident_id" parameter from "REPLACE.ME"
352+
And body with value {"data": {"attributes": {"document_url": "https://app.datadoghq.com/notebook/123", "title": "Postmortem for IR-123"}, "type": "incident_postmortems"}}
353+
When the request is sent
354+
Then the response status is 404 Not Found
355+
317356
@generated @skip @team:DataDog/incident-app
318357
Scenario: Create postmortem template returns "Bad Request" response
319358
Given operation "CreateIncidentPostmortemTemplate" enabled
@@ -601,6 +640,32 @@ Feature: Incidents
601640
When the request is sent
602641
Then the response status is 204 No Content
603642

643+
@generated @skip @team:DataDog/incident-app
644+
Scenario: Delete postmortem for an incident returns "Bad Request" response
645+
Given operation "DeleteIncidentPostmortem" enabled
646+
And new "DeleteIncidentPostmortem" request
647+
And request contains "incident_id" parameter from "REPLACE.ME"
648+
When the request is sent
649+
Then the response status is 400 Bad Request
650+
651+
@generated @skip @team:DataDog/incident-app
652+
Scenario: Delete postmortem for an incident returns "Not Found" response
653+
Given operation "DeleteIncidentPostmortem" enabled
654+
And new "DeleteIncidentPostmortem" request
655+
And request contains "incident_id" parameter from "REPLACE.ME"
656+
When the request is sent
657+
Then the response status is 404 Not Found
658+
659+
@team:DataDog/incident-app
660+
Scenario: Delete postmortem for an incident returns "OK" response
661+
Given operation "DeleteIncidentPostmortem" enabled
662+
And there is a valid "incident" in the system
663+
And there is a valid "postmortem" in the system
664+
And new "DeleteIncidentPostmortem" request
665+
And request contains "incident_id" parameter from "postmortem.data.relationships.incident.data.id"
666+
When the request is sent
667+
Then the response status is 204 OK
668+
604669
@generated @skip @team:DataDog/incident-app
605670
Scenario: Delete postmortem template returns "Bad Request" response
606671
Given operation "DeleteIncidentPostmortemTemplate" enabled
@@ -929,6 +994,33 @@ Feature: Incidents
929994
When the request is sent
930995
Then the response status is 200 OK
931996

997+
@generated @skip @team:DataDog/incident-app
998+
Scenario: Get postmortem for an incident returns "Bad Request" response
999+
Given operation "GetIncidentPostmortem" enabled
1000+
And new "GetIncidentPostmortem" request
1001+
And request contains "incident_id" parameter from "REPLACE.ME"
1002+
When the request is sent
1003+
Then the response status is 400 Bad Request
1004+
1005+
@generated @skip @team:DataDog/incident-app
1006+
Scenario: Get postmortem for an incident returns "Not Found" response
1007+
Given operation "GetIncidentPostmortem" enabled
1008+
And new "GetIncidentPostmortem" request
1009+
And request contains "incident_id" parameter from "REPLACE.ME"
1010+
When the request is sent
1011+
Then the response status is 404 Not Found
1012+
1013+
@team:DataDog/incident-app
1014+
Scenario: Get postmortem for an incident returns "OK" response
1015+
Given operation "GetIncidentPostmortem" enabled
1016+
And there is a valid "incident" in the system
1017+
And there is a valid "postmortem" in the system
1018+
And new "GetIncidentPostmortem" request
1019+
And request contains "incident_id" parameter from "postmortem.data.relationships.incident.data.id"
1020+
When the request is sent
1021+
Then the response status is 200 OK
1022+
And the response "data.attributes.title" has the same value as "postmortem.data.attributes.title"
1023+
9321024
@generated @skip @team:DataDog/incident-app
9331025
Scenario: Get postmortem template returns "Bad Request" response
9341026
Given operation "GetIncidentPostmortemTemplate" enabled
@@ -1480,6 +1572,36 @@ Feature: Incidents
14801572
And the response "data.attributes.name" has the same value as "unique"
14811573
And the response "data.attributes.category" is equal to "update"
14821574

1575+
@generated @skip @team:DataDog/incident-app
1576+
Scenario: Update postmortem for an incident returns "Bad Request" response
1577+
Given operation "UpdateIncidentPostmortem" enabled
1578+
And new "UpdateIncidentPostmortem" request
1579+
And request contains "incident_id" parameter from "REPLACE.ME"
1580+
And body with value {"data": {"attributes": {"status": "draft"}, "id": "00000000-0000-abcd-1000-000000000000", "type": "incident_postmortems"}}
1581+
When the request is sent
1582+
Then the response status is 400 Bad Request
1583+
1584+
@generated @skip @team:DataDog/incident-app
1585+
Scenario: Update postmortem for an incident returns "Not Found" response
1586+
Given operation "UpdateIncidentPostmortem" enabled
1587+
And new "UpdateIncidentPostmortem" request
1588+
And request contains "incident_id" parameter from "REPLACE.ME"
1589+
And body with value {"data": {"attributes": {"status": "draft"}, "id": "00000000-0000-abcd-1000-000000000000", "type": "incident_postmortems"}}
1590+
When the request is sent
1591+
Then the response status is 404 Not Found
1592+
1593+
@team:DataDog/incident-app
1594+
Scenario: Update postmortem for an incident returns "OK" response
1595+
Given operation "UpdateIncidentPostmortem" enabled
1596+
And there is a valid "incident" in the system
1597+
And there is a valid "postmortem" in the system
1598+
And new "UpdateIncidentPostmortem" request
1599+
And request contains "incident_id" parameter from "postmortem.data.relationships.incident.data.id"
1600+
And body with value {"data": {"attributes": {"status": "in_review"}, "id": "{{ postmortem.data.id }}", "type": "incident_postmortems"}}
1601+
When the request is sent
1602+
Then the response status is 200 OK
1603+
And the response "data.attributes.status" is equal to "in_review"
1604+
14831605
@generated @skip @team:DataDog/incident-app
14841606
Scenario: Update postmortem template returns "Bad Request" response
14851607
Given operation "UpdateIncidentPostmortemTemplate" enabled

features/v2/undo.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,6 +3218,37 @@
32183218
"type": "idempotent"
32193219
}
32203220
},
3221+
"DeleteIncidentPostmortem": {
3222+
"tag": "Incidents",
3223+
"undo": {
3224+
"type": "idempotent"
3225+
}
3226+
},
3227+
"GetIncidentPostmortem": {
3228+
"tag": "Incidents",
3229+
"undo": {
3230+
"type": "safe"
3231+
}
3232+
},
3233+
"UpdateIncidentPostmortem": {
3234+
"tag": "Incidents",
3235+
"undo": {
3236+
"type": "idempotent"
3237+
}
3238+
},
3239+
"CreateIncidentPostmortem": {
3240+
"tag": "Incidents",
3241+
"undo": {
3242+
"operationId": "DeleteIncidentPostmortem",
3243+
"parameters": [
3244+
{
3245+
"name": "incident_id",
3246+
"source": "data.relationships.incident.data.id"
3247+
}
3248+
],
3249+
"type": "unsafe"
3250+
}
3251+
},
32213252
"ListIncidentIntegrations": {
32223253
"tag": "Incidents",
32233254
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10256,6 +10256,54 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
1025610256
},
1025710257
operationResponseType: "{}",
1025810258
},
10259+
"IncidentsApi.V2.GetIncidentPostmortem": {
10260+
incidentId: {
10261+
type: "string",
10262+
format: "",
10263+
},
10264+
include: {
10265+
type: "string",
10266+
format: "",
10267+
},
10268+
operationResponseType: "IncidentPostmortemResponse",
10269+
},
10270+
"IncidentsApi.V2.CreateIncidentPostmortem": {
10271+
incidentId: {
10272+
type: "string",
10273+
format: "",
10274+
},
10275+
include: {
10276+
type: "string",
10277+
format: "",
10278+
},
10279+
body: {
10280+
type: "IncidentPostmortemCreateRequest",
10281+
format: "",
10282+
},
10283+
operationResponseType: "IncidentPostmortemResponse",
10284+
},
10285+
"IncidentsApi.V2.DeleteIncidentPostmortem": {
10286+
incidentId: {
10287+
type: "string",
10288+
format: "",
10289+
},
10290+
operationResponseType: "{}",
10291+
},
10292+
"IncidentsApi.V2.UpdateIncidentPostmortem": {
10293+
incidentId: {
10294+
type: "string",
10295+
format: "",
10296+
},
10297+
include: {
10298+
type: "string",
10299+
format: "",
10300+
},
10301+
body: {
10302+
type: "IncidentPostmortemUpdateRequest",
10303+
format: "",
10304+
},
10305+
operationResponseType: "IncidentPostmortemResponse",
10306+
},
1025910307
"IncidentsApi.V2.ListIncidentIntegrations": {
1026010308
incidentId: {
1026110309
type: "string",

0 commit comments

Comments
 (0)