Skip to content

Commit a344b30

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cf584c6 of spec repo
1 parent 64618c4 commit a344b30

25 files changed

+3713
-33
lines changed

.generator/schemas/v2/openapi.yaml

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

features/v2/incidents.feature

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,30 @@ Feature: Incidents
186186
When the request is sent
187187
Then the response status is 404 Not Found
188188

189+
@generated @skip @team:DataDog/incident-app
190+
Scenario: Create an incident user-defined field returns "Bad Request" response
191+
Given operation "CreateIncidentUserDefinedField" enabled
192+
And new "CreateIncidentUserDefinedField" request
193+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "name": "root_cause", "ordinal": "1.5", "required": false, "tag_key": "datacenter", "type": 3, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "user_defined_field"}}
194+
When the request is sent
195+
Then the response status is 400 Bad Request
196+
197+
@generated @skip @team:DataDog/incident-app
198+
Scenario: Create an incident user-defined field returns "CREATED" response
199+
Given operation "CreateIncidentUserDefinedField" enabled
200+
And new "CreateIncidentUserDefinedField" request
201+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "name": "root_cause", "ordinal": "1.5", "required": false, "tag_key": "datacenter", "type": 3, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "user_defined_field"}}
202+
When the request is sent
203+
Then the response status is 201 CREATED
204+
205+
@generated @skip @team:DataDog/incident-app
206+
Scenario: Create an incident user-defined field returns "Not Found" response
207+
Given operation "CreateIncidentUserDefinedField" enabled
208+
And new "CreateIncidentUserDefinedField" request
209+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "name": "root_cause", "ordinal": "1.5", "required": false, "tag_key": "datacenter", "type": 3, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "user_defined_field"}}
210+
When the request is sent
211+
Then the response status is 404 Not Found
212+
189213
@generated @skip @team:DataDog/incident-app
190214
Scenario: Create global incident handle returns "Bad Request" response
191215
Given operation "CreateGlobalIncidentHandle" enabled
@@ -482,6 +506,30 @@ Feature: Incidents
482506
When the request is sent
483507
Then the response status is 204 OK
484508

509+
@generated @skip @team:DataDog/incident-app
510+
Scenario: Delete an incident user-defined field returns "Bad Request" response
511+
Given operation "DeleteIncidentUserDefinedField" enabled
512+
And new "DeleteIncidentUserDefinedField" request
513+
And request contains "field_id" parameter from "REPLACE.ME"
514+
When the request is sent
515+
Then the response status is 400 Bad Request
516+
517+
@generated @skip @team:DataDog/incident-app
518+
Scenario: Delete an incident user-defined field returns "No Content" response
519+
Given operation "DeleteIncidentUserDefinedField" enabled
520+
And new "DeleteIncidentUserDefinedField" request
521+
And request contains "field_id" parameter from "REPLACE.ME"
522+
When the request is sent
523+
Then the response status is 204 No Content
524+
525+
@generated @skip @team:DataDog/incident-app
526+
Scenario: Delete an incident user-defined field returns "Not Found" response
527+
Given operation "DeleteIncidentUserDefinedField" enabled
528+
And new "DeleteIncidentUserDefinedField" request
529+
And request contains "field_id" parameter from "REPLACE.ME"
530+
When the request is sent
531+
Then the response status is 404 Not Found
532+
485533
@generated @skip @team:DataDog/incident-app
486534
Scenario: Delete global incident handle returns "Bad Request" response
487535
Given operation "DeleteGlobalIncidentHandle" enabled
@@ -647,6 +695,20 @@ Feature: Incidents
647695
When the request is sent
648696
Then the response status is 200 OK
649697

698+
@generated @skip @team:DataDog/incident-app
699+
Scenario: Get a list of incident user-defined fields returns "Bad Request" response
700+
Given operation "ListIncidentUserDefinedFields" enabled
701+
And new "ListIncidentUserDefinedFields" request
702+
When the request is sent
703+
Then the response status is 400 Bad Request
704+
705+
@generated @skip @team:DataDog/incident-app
706+
Scenario: Get a list of incident user-defined fields returns "OK" response
707+
Given operation "ListIncidentUserDefinedFields" enabled
708+
And new "ListIncidentUserDefinedFields" request
709+
When the request is sent
710+
Then the response status is 200 OK
711+
650712
@generated @skip @team:DataDog/incident-app
651713
Scenario: Get a list of incidents returns "Bad Request" response
652714
Given operation "ListIncidents" enabled
@@ -703,6 +765,22 @@ Feature: Incidents
703765
When the request is sent
704766
Then the response status is 200 OK
705767

768+
@generated @skip @team:DataDog/incident-app
769+
Scenario: Get an incident user-defined field returns "Not Found" response
770+
Given operation "GetIncidentUserDefinedField" enabled
771+
And new "GetIncidentUserDefinedField" request
772+
And request contains "field_id" parameter from "REPLACE.ME"
773+
When the request is sent
774+
Then the response status is 404 Not Found
775+
776+
@generated @skip @team:DataDog/incident-app
777+
Scenario: Get an incident user-defined field returns "OK" response
778+
Given operation "GetIncidentUserDefinedField" enabled
779+
And new "GetIncidentUserDefinedField" request
780+
And request contains "field_id" parameter from "REPLACE.ME"
781+
When the request is sent
782+
Then the response status is 200 OK
783+
706784
@generated @skip @team:DataDog/incident-app
707785
Scenario: Get global incident settings returns "Bad Request" response
708786
Given operation "GetGlobalIncidentSettings" enabled
@@ -927,6 +1005,30 @@ Feature: Incidents
9271005
When the request is sent
9281006
Then the response status is 404 Not Found
9291007

1008+
@generated @skip @team:DataDog/incident-app
1009+
Scenario: Import values for an incident user-defined field returns "Bad Request" response
1010+
Given operation "ImportIncidentUserDefinedFieldValues" enabled
1011+
And new "ImportIncidentUserDefinedFieldValues" request
1012+
And request contains "field_id" parameter from "REPLACE.ME"
1013+
When the request is sent
1014+
Then the response status is 400 Bad Request
1015+
1016+
@generated @skip @team:DataDog/incident-app
1017+
Scenario: Import values for an incident user-defined field returns "CREATED" response
1018+
Given operation "ImportIncidentUserDefinedFieldValues" enabled
1019+
And new "ImportIncidentUserDefinedFieldValues" request
1020+
And request contains "field_id" parameter from "REPLACE.ME"
1021+
When the request is sent
1022+
Then the response status is 201 CREATED
1023+
1024+
@generated @skip @team:DataDog/incident-app
1025+
Scenario: Import values for an incident user-defined field returns "Not Found" response
1026+
Given operation "ImportIncidentUserDefinedFieldValues" enabled
1027+
And new "ImportIncidentUserDefinedFieldValues" request
1028+
And request contains "field_id" parameter from "REPLACE.ME"
1029+
When the request is sent
1030+
Then the response status is 404 Not Found
1031+
9301032
@generated @skip @team:DataDog/incident-app
9311033
Scenario: List an incident's impacts returns "Bad Request" response
9321034
Given new "ListIncidentImpacts" request
@@ -1243,6 +1345,33 @@ Feature: Incidents
12431345
When the request is sent
12441346
Then the response status is 200 OK
12451347

1348+
@generated @skip @team:DataDog/incident-app
1349+
Scenario: Update an incident user-defined field returns "Bad Request" response
1350+
Given operation "UpdateIncidentUserDefinedField" enabled
1351+
And new "UpdateIncidentUserDefinedField" request
1352+
And request contains "field_id" parameter from "REPLACE.ME"
1353+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "ordinal": "1.5", "required": false, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "id": "00000000-0000-0000-0000-000000000000", "type": "user_defined_field"}}
1354+
When the request is sent
1355+
Then the response status is 400 Bad Request
1356+
1357+
@generated @skip @team:DataDog/incident-app
1358+
Scenario: Update an incident user-defined field returns "Not Found" response
1359+
Given operation "UpdateIncidentUserDefinedField" enabled
1360+
And new "UpdateIncidentUserDefinedField" request
1361+
And request contains "field_id" parameter from "REPLACE.ME"
1362+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "ordinal": "1.5", "required": false, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "id": "00000000-0000-0000-0000-000000000000", "type": "user_defined_field"}}
1363+
When the request is sent
1364+
Then the response status is 404 Not Found
1365+
1366+
@generated @skip @team:DataDog/incident-app
1367+
Scenario: Update an incident user-defined field returns "OK" response
1368+
Given operation "UpdateIncidentUserDefinedField" enabled
1369+
And new "UpdateIncidentUserDefinedField" request
1370+
And request contains "field_id" parameter from "REPLACE.ME"
1371+
And body with value {"data": {"attributes": {"category": "what_happened", "collected": "active", "default_value": "critical", "display_name": "Root Cause", "ordinal": "1.5", "required": false, "valid_values": [{"description": "A critical severity incident.", "display_name": "Critical", "short_description": "Critical", "value": "critical"}]}, "id": "00000000-0000-0000-0000-000000000000", "type": "user_defined_field"}}
1372+
When the request is sent
1373+
Then the response status is 200 OK
1374+
12461375
@generated @skip @team:DataDog/incident-app
12471376
Scenario: Update global incident handle returns "Bad Request" response
12481377
Given operation "UpdateGlobalIncidentHandle" enabled

features/v2/undo.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,12 @@
17821782
"type": "unsafe"
17831783
}
17841784
},
1785+
"ImportIncidentUserDefinedFieldValues": {
1786+
"tag": "Incidents",
1787+
"undo": {
1788+
"type": "unsafe"
1789+
}
1790+
},
17851791
"DeleteGlobalIncidentHandle": {
17861792
"tag": "Incidents",
17871793
"undo": {
@@ -1968,6 +1974,43 @@
19681974
"type": "idempotent"
19691975
}
19701976
},
1977+
"ListIncidentUserDefinedFields": {
1978+
"tag": "Incidents",
1979+
"undo": {
1980+
"type": "safe"
1981+
}
1982+
},
1983+
"CreateIncidentUserDefinedField": {
1984+
"tag": "Incidents",
1985+
"undo": {
1986+
"operationId": "DeleteIncidentUserDefinedField",
1987+
"parameters": [
1988+
{
1989+
"name": "field_id",
1990+
"source": "data.id"
1991+
}
1992+
],
1993+
"type": "unsafe"
1994+
}
1995+
},
1996+
"DeleteIncidentUserDefinedField": {
1997+
"tag": "Incidents",
1998+
"undo": {
1999+
"type": "idempotent"
2000+
}
2001+
},
2002+
"GetIncidentUserDefinedField": {
2003+
"tag": "Incidents",
2004+
"undo": {
2005+
"type": "safe"
2006+
}
2007+
},
2008+
"UpdateIncidentUserDefinedField": {
2009+
"tag": "Incidents",
2010+
"undo": {
2011+
"type": "idempotent"
2012+
}
2013+
},
19712014
"ImportIncident": {
19722015
"tag": "Incidents",
19732016
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6159,6 +6159,21 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
61596159
},
61606160
operationResponseType: "IncidentResponse",
61616161
},
6162+
"IncidentsApi.V2.ImportIncidentUserDefinedFieldValues": {
6163+
fieldId: {
6164+
type: "string",
6165+
format: "",
6166+
},
6167+
file: {
6168+
type: "HttpFile",
6169+
format: "binary",
6170+
},
6171+
replaceValues: {
6172+
type: "string",
6173+
format: "",
6174+
},
6175+
operationResponseType: "IncidentUserDefinedFieldResponse",
6176+
},
61626177
"IncidentsApi.V2.ListGlobalIncidentHandles": {
61636178
include: {
61646179
type: "string",
@@ -6381,6 +6396,73 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
63816396
},
63826397
operationResponseType: "IncidentTypeResponse",
63836398
},
6399+
"IncidentsApi.V2.ListIncidentUserDefinedFields": {
6400+
pageSize: {
6401+
type: "number",
6402+
format: "int64",
6403+
},
6404+
pageNumber: {
6405+
type: "number",
6406+
format: "int64",
6407+
},
6408+
includeDeleted: {
6409+
type: "boolean",
6410+
format: "",
6411+
},
6412+
filterIncidentType: {
6413+
type: "string",
6414+
format: "",
6415+
},
6416+
include: {
6417+
type: "string",
6418+
format: "",
6419+
},
6420+
operationResponseType: "IncidentUserDefinedFieldListResponse",
6421+
},
6422+
"IncidentsApi.V2.CreateIncidentUserDefinedField": {
6423+
include: {
6424+
type: "string",
6425+
format: "",
6426+
},
6427+
body: {
6428+
type: "IncidentUserDefinedFieldCreateRequest",
6429+
format: "",
6430+
},
6431+
operationResponseType: "IncidentUserDefinedFieldResponse",
6432+
},
6433+
"IncidentsApi.V2.GetIncidentUserDefinedField": {
6434+
fieldId: {
6435+
type: "string",
6436+
format: "",
6437+
},
6438+
include: {
6439+
type: "string",
6440+
format: "",
6441+
},
6442+
operationResponseType: "IncidentUserDefinedFieldResponse",
6443+
},
6444+
"IncidentsApi.V2.DeleteIncidentUserDefinedField": {
6445+
fieldId: {
6446+
type: "string",
6447+
format: "",
6448+
},
6449+
operationResponseType: "{}",
6450+
},
6451+
"IncidentsApi.V2.UpdateIncidentUserDefinedField": {
6452+
fieldId: {
6453+
type: "string",
6454+
format: "",
6455+
},
6456+
include: {
6457+
type: "string",
6458+
format: "",
6459+
},
6460+
body: {
6461+
type: "IncidentUserDefinedFieldUpdateRequest",
6462+
format: "",
6463+
},
6464+
operationResponseType: "IncidentUserDefinedFieldResponse",
6465+
},
63846466
"IncidentsApi.V2.ImportIncident": {
63856467
include: {
63866468
type: "Array<IncidentImportRelatedObject>",

0 commit comments

Comments
 (0)