Skip to content

Commit e882be8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3f857fb of spec repo
1 parent 48b6e1c commit e882be8

30 files changed

+2325
-42
lines changed

.generator/schemas/v2/openapi.yaml

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

features/v2/incidents.feature

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,14 +806,16 @@ Feature: Incidents
806806

807807
@generated @skip @team:DataDog/incident-app
808808
Scenario: List an incident's impacts returns "Bad Request" response
809-
Given new "ListIncidentImpacts" request
809+
Given operation "ListIncidentImpacts" enabled
810+
And new "ListIncidentImpacts" request
810811
And request contains "incident_id" parameter from "REPLACE.ME"
811812
When the request is sent
812813
Then the response status is 400 Bad Request
813814

814815
@generated @skip @team:DataDog/incident-app
815816
Scenario: List an incident's impacts returns "Not Found" response
816-
Given new "ListIncidentImpacts" request
817+
Given operation "ListIncidentImpacts" enabled
818+
And new "ListIncidentImpacts" request
817819
And request contains "incident_id" parameter from "REPLACE.ME"
818820
When the request is sent
819821
Then the response status is 404 Not Found

features/v2/synthetics.feature

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,73 @@ Feature: Synthetics
2727
When the request is sent
2828
Then the response status is 200 OK
2929
And the response "data.attributes.on_demand_concurrency_cap" is equal to 20
30+
31+
@generated @skip @team:DataDog/synthetics-managing
32+
Scenario: Search Synthetics suites returns "API error response." response
33+
Given new "SearchSuites" request
34+
When the request is sent
35+
Then the response status is 400 API error response.
36+
37+
@team:DataDog/synthetics-managing
38+
Scenario: Search Synthetics suites returns "OK" response
39+
Given new "SearchSuites" request
40+
When the request is sent
41+
Then the response status is 200 OK
42+
43+
@generated @skip @team:DataDog/synthetics-managing
44+
Scenario: Synthetics: Bulk delete suites returns "API error response." response
45+
Given new "DeleteSyntheticsSuites" request
46+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
47+
When the request is sent
48+
Then the response status is 400 API error response.
49+
50+
@generated @skip @team:DataDog/synthetics-managing
51+
Scenario: Synthetics: Bulk delete suites returns "OK" response
52+
Given new "DeleteSyntheticsSuites" request
53+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
54+
When the request is sent
55+
Then the response status is 200 OK
56+
57+
@generated @skip @team:DataDog/synthetics-managing
58+
Scenario: Synthetics: Create a test suite returns "API error response." response
59+
Given new "CreateSyntheticsSuite" request
60+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}}
61+
When the request is sent
62+
Then the response status is 400 API error response.
63+
64+
@team:DataDog/synthetics-managing
65+
Scenario: Synthetics: Create a test suite returns "OK" response
66+
Given new "CreateSyntheticsSuite" request
67+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suites"}}
68+
When the request is sent
69+
Then the response status is 200 OK
70+
71+
@generated @skip @team:DataDog/synthetics-managing
72+
Scenario: Synthetics: Get a suite returns "API error response." response
73+
Given new "GetSyntheticsSuite" request
74+
And request contains "public_id" parameter from "REPLACE.ME"
75+
When the request is sent
76+
Then the response status is 404 API error response.
77+
78+
@generated @skip @team:DataDog/synthetics-managing
79+
Scenario: Synthetics: Get a suite returns "OK" response
80+
Given new "GetSyntheticsSuite" request
81+
And request contains "public_id" parameter from "REPLACE.ME"
82+
When the request is sent
83+
Then the response status is 200 OK
84+
85+
@generated @skip @team:DataDog/synthetics-managing
86+
Scenario: Synthetics: edit a test suite returns "API error response." response
87+
Given new "EditSyntheticsSuite" request
88+
And request contains "public_id" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}}
90+
When the request is sent
91+
Then the response status is 400 API error response.
92+
93+
@generated @skip @team:DataDog/synthetics-managing
94+
Scenario: Synthetics: edit a test suite returns "OK" response
95+
Given new "EditSyntheticsSuite" request
96+
And request contains "public_id" parameter from "REPLACE.ME"
97+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}}
98+
When the request is sent
99+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4433,6 +4433,43 @@
44334433
"type": "safe"
44344434
}
44354435
},
4436+
"CreateSyntheticsSuite": {
4437+
"tag": "Synthetics",
4438+
"undo": {
4439+
"operationId": "DeleteSyntheticsSuites",
4440+
"parameters": [
4441+
{
4442+
"name": "body",
4443+
"template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ data.attributes.public_id }}\"]}}"
4444+
}
4445+
],
4446+
"type": "unsafe"
4447+
}
4448+
},
4449+
"DeleteSyntheticsSuites": {
4450+
"tag": "Synthetics",
4451+
"undo": {
4452+
"type": "idempotent"
4453+
}
4454+
},
4455+
"SearchSuites": {
4456+
"tag": "Synthetics",
4457+
"undo": {
4458+
"type": "safe"
4459+
}
4460+
},
4461+
"GetSyntheticsSuite": {
4462+
"tag": "Synthetics",
4463+
"undo": {
4464+
"type": "safe"
4465+
}
4466+
},
4467+
"EditSyntheticsSuite": {
4468+
"tag": "Synthetics",
4469+
"undo": {
4470+
"type": "idempotent"
4471+
}
4472+
},
44364473
"ListTagPipelinesRulesets": {
44374474
"tag": "Cloud Cost Management",
44384475
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8946,6 +8946,61 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
89468946
},
89478947
operationResponseType: "OnDemandConcurrencyCapResponse",
89488948
},
8949+
"SyntheticsApi.V2.CreateSyntheticsSuite": {
8950+
body: {
8951+
type: "SuiteCreateEditRequest",
8952+
format: "",
8953+
},
8954+
operationResponseType: "SyntheticsSuiteResponse",
8955+
},
8956+
"SyntheticsApi.V2.DeleteSyntheticsSuites": {
8957+
body: {
8958+
type: "DeletedSuitesRequestDeleteRequest",
8959+
format: "",
8960+
},
8961+
operationResponseType: "DeletedSuitesResponse",
8962+
},
8963+
"SyntheticsApi.V2.SearchSuites": {
8964+
query: {
8965+
type: "string",
8966+
format: "",
8967+
},
8968+
sort: {
8969+
type: "string",
8970+
format: "",
8971+
},
8972+
facetsOnly: {
8973+
type: "boolean",
8974+
format: "",
8975+
},
8976+
start: {
8977+
type: "number",
8978+
format: "int64",
8979+
},
8980+
count: {
8981+
type: "number",
8982+
format: "int64",
8983+
},
8984+
operationResponseType: "SyntheticsSuiteSearchResponse",
8985+
},
8986+
"SyntheticsApi.V2.GetSyntheticsSuite": {
8987+
publicId: {
8988+
type: "string",
8989+
format: "",
8990+
},
8991+
operationResponseType: "SyntheticsSuiteResponse",
8992+
},
8993+
"SyntheticsApi.V2.EditSyntheticsSuite": {
8994+
publicId: {
8995+
type: "string",
8996+
format: "",
8997+
},
8998+
body: {
8999+
type: "SuiteCreateEditRequest",
9000+
format: "",
9001+
},
9002+
operationResponseType: "SyntheticsSuiteResponse",
9003+
},
89499004
"TeamsApi.V2.ListTeams": {
89509005
pageNumber: {
89519006
type: "number",

services/incidents/src/v2/IncidentsApi.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory {
137137
): Promise<RequestContext> {
138138
const _config = _options || this.configuration;
139139

140+
if (!_config.unstableOperations["IncidentsApi.v2.createIncidentImpact"]) {
141+
throw new Error(
142+
"Unstable operation 'createIncidentImpact' is disabled. Enable it by setting `configuration.unstableOperations['IncidentsApi.v2.createIncidentImpact'] = true`",
143+
);
144+
}
145+
140146
// verify required parameter 'incidentId' is not null or undefined
141147
if (incidentId === null || incidentId === undefined) {
142148
throw new RequiredError("incidentId", "createIncidentImpact");
@@ -587,6 +593,12 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory {
587593
): Promise<RequestContext> {
588594
const _config = _options || this.configuration;
589595

596+
if (!_config.unstableOperations["IncidentsApi.v2.deleteIncidentImpact"]) {
597+
throw new Error(
598+
"Unstable operation 'deleteIncidentImpact' is disabled. Enable it by setting `configuration.unstableOperations['IncidentsApi.v2.deleteIncidentImpact'] = true`",
599+
);
600+
}
601+
590602
// verify required parameter 'incidentId' is not null or undefined
591603
if (incidentId === null || incidentId === undefined) {
592604
throw new RequiredError("incidentId", "deleteIncidentImpact");
@@ -1386,6 +1398,12 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory {
13861398
): Promise<RequestContext> {
13871399
const _config = _options || this.configuration;
13881400

1401+
if (!_config.unstableOperations["IncidentsApi.v2.listIncidentImpacts"]) {
1402+
throw new Error(
1403+
"Unstable operation 'listIncidentImpacts' is disabled. Enable it by setting `configuration.unstableOperations['IncidentsApi.v2.listIncidentImpacts'] = true`",
1404+
);
1405+
}
1406+
13891407
// verify required parameter 'incidentId' is not null or undefined
13901408
if (incidentId === null || incidentId === undefined) {
13911409
throw new RequiredError("incidentId", "listIncidentImpacts");

0 commit comments

Comments
 (0)