Skip to content

Commit 0a9af30

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8176bfc of spec repo (#121)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 56ed7e7 commit 0a9af30

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev6",
7-
"regenerated": "2021-05-10 15:06:20.209297",
8-
"spec_repo_commit": "b9a2b4b"
7+
"regenerated": "2021-05-10 15:34:37.954777",
8+
"spec_repo_commit": "8176bfc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-10 15:06:26.446774",
13-
"spec_repo_commit": "b9a2b4b"
12+
"regenerated": "2021-05-10 15:34:43.776022",
13+
"spec_repo_commit": "8176bfc"
1414
}
1515
}
1616
}

features/v1/service_level_objective_corrections.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Feature: Service Level Objective Corrections
2828
When the request is sent
2929
Then the response status is 200 OK
3030

31+
@skip
32+
Scenario: Create an SLO correction returns "SLO Not Found" response
33+
Given operation "CreateSLOCorrection" enabled
34+
And new "CreateSLOCorrection" request
35+
And body with value {"data": {"attributes": {"category": "Scheduled Maintenance", "description": "{{ unique }}", "end": {{ hour_later_ts }}, "slo_id": "sloId", "start": {{ now_ts }}, "timezone": "UTC"}, "type": "correction"}}
36+
When the request is sent
37+
Then the response status is 404 SLO Not Found
38+
3139
@generated @skip
3240
Scenario: Delete an SLO correction returns "Not found" response
3341
Given operation "DeleteSLOCorrection" enabled

packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,13 @@ export class ServiceLevelObjectiveCorrectionsApiResponseProcessor {
298298
) as APIErrorResponse;
299299
throw new ApiException<APIErrorResponse>(403, body);
300300
}
301+
if (isCodeInRange("404", response.httpStatusCode)) {
302+
const body: APIErrorResponse = ObjectSerializer.deserialize(
303+
ObjectSerializer.parse(await response.body.text(), contentType),
304+
"APIErrorResponse", ""
305+
) as APIErrorResponse;
306+
throw new ApiException<APIErrorResponse>(404, body);
307+
}
301308

302309
// Work around for missing responses in specification, e.g. for petstore.yaml
303310
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {

0 commit comments

Comments
 (0)