Skip to content

Commit 74554a1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Document force_delete_dependencies for synthetics test deletion (#1668)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 84500a9 commit 74554a1

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
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.6.6",
7-
"regenerated": "2024-07-02 18:17:50.120632",
8-
"spec_repo_commit": "464f0cec"
7+
"regenerated": "2024-07-02 18:50:24.822584",
8+
"spec_repo_commit": "fae9d797"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-02 18:17:50.138246",
13-
"spec_repo_commit": "464f0cec"
12+
"regenerated": "2024-07-02 18:50:24.840415",
13+
"spec_repo_commit": "fae9d797"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14944,6 +14944,13 @@ components:
1494414944

1494514945
to delete.'
1494614946
properties:
14947+
force_delete_dependencies:
14948+
description: 'Delete the Synthetic test even if it''s referenced by other
14949+
resources
14950+
14951+
(for example, SLOs and composite monitors).'
14952+
example: false
14953+
type: boolean
1494714954
public_ids:
1494814955
description: An array of Synthetic test IDs you want to delete.
1494914956
example: []

features/v1/synthetics.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,14 @@ Feature: Synthetics
269269
@generated @skip @team:DataDog/synthetics-ct
270270
Scenario: Delete tests returns "- JSON format is wrong" response
271271
Given new "DeleteTests" request
272-
And body with value {"public_ids": []}
272+
And body with value {"force_delete_dependencies": false, "public_ids": []}
273273
When the request is sent
274274
Then the response status is 400 - JSON format is wrong
275275

276276
@generated @skip @team:DataDog/synthetics-ct
277277
Scenario: Delete tests returns "- Tests to be deleted can't be found" response
278278
Given new "DeleteTests" request
279-
And body with value {"public_ids": []}
279+
And body with value {"force_delete_dependencies": false, "public_ids": []}
280280
When the request is sent
281281
Then the response status is 404 - Tests to be deleted can't be found
282282

packages/datadog-api-client-v1/models/SyntheticsDeleteTestsPayload.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1111
* to delete.
1212
*/
1313
export class SyntheticsDeleteTestsPayload {
14+
/**
15+
* Delete the Synthetic test even if it's referenced by other resources
16+
* (for example, SLOs and composite monitors).
17+
*/
18+
"forceDeleteDependencies"?: boolean;
1419
/**
1520
* An array of Synthetic test IDs you want to delete.
1621
*/
@@ -32,6 +37,10 @@ export class SyntheticsDeleteTestsPayload {
3237
* @ignore
3338
*/
3439
static readonly attributeTypeMap: AttributeTypeMap = {
40+
forceDeleteDependencies: {
41+
baseName: "force_delete_dependencies",
42+
type: "boolean",
43+
},
3544
publicIds: {
3645
baseName: "public_ids",
3746
type: "Array<string>",

0 commit comments

Comments
 (0)