diff --git a/.apigentools-info b/.apigentools-info index 97f270933e6..77e3584d2a9 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-02 18:17:50.120632", - "spec_repo_commit": "464f0cec" + "regenerated": "2024-07-02 18:50:24.822584", + "spec_repo_commit": "fae9d797" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-02 18:17:50.138246", - "spec_repo_commit": "464f0cec" + "regenerated": "2024-07-02 18:50:24.840415", + "spec_repo_commit": "fae9d797" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 99057418012..749e1885306 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -14944,6 +14944,13 @@ components: to delete.' properties: + force_delete_dependencies: + description: 'Delete the Synthetic test even if it''s referenced by other + resources + + (for example, SLOs and composite monitors).' + example: false + type: boolean public_ids: description: An array of Synthetic test IDs you want to delete. example: [] diff --git a/features/v1/synthetics.feature b/features/v1/synthetics.feature index a3e3e317d7c..4fbd51367d2 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -269,14 +269,14 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-ct Scenario: Delete tests returns "- JSON format is wrong" response Given new "DeleteTests" request - And body with value {"public_ids": []} + And body with value {"force_delete_dependencies": false, "public_ids": []} When the request is sent Then the response status is 400 - JSON format is wrong @generated @skip @team:DataDog/synthetics-ct Scenario: Delete tests returns "- Tests to be deleted can't be found" response Given new "DeleteTests" request - And body with value {"public_ids": []} + And body with value {"force_delete_dependencies": false, "public_ids": []} When the request is sent Then the response status is 404 - Tests to be deleted can't be found diff --git a/packages/datadog-api-client-v1/models/SyntheticsDeleteTestsPayload.ts b/packages/datadog-api-client-v1/models/SyntheticsDeleteTestsPayload.ts index 3f22349fcf1..e99b9c4c97b 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsDeleteTestsPayload.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsDeleteTestsPayload.ts @@ -11,6 +11,11 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * to delete. */ export class SyntheticsDeleteTestsPayload { + /** + * Delete the Synthetic test even if it's referenced by other resources + * (for example, SLOs and composite monitors). + */ + "forceDeleteDependencies"?: boolean; /** * An array of Synthetic test IDs you want to delete. */ @@ -32,6 +37,10 @@ export class SyntheticsDeleteTestsPayload { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + forceDeleteDependencies: { + baseName: "force_delete_dependencies", + type: "boolean", + }, publicIds: { baseName: "public_ids", type: "Array",