Skip to content

Commit

Permalink
Document force_delete_dependencies for synthetics test deletion (#2016
Browse files Browse the repository at this point in the history
)

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jul 2, 2024
1 parent 464e4be commit 7b6fb69
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-02 18:17:59.207116",
"spec_repo_commit": "464f0cec"
"regenerated": "2024-07-02 18:50:20.936980",
"spec_repo_commit": "fae9d797"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-02 18:17:59.224176",
"spec_repo_commit": "464f0cec"
"regenerated": "2024-07-02 18:50:20.953928",
"spec_repo_commit": "fae9d797"
}
}
}
7 changes: 7 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,34 @@ class SyntheticsDeleteTestsPayload(ModelNormal):
@cached_property
def openapi_types(_):
return {
"force_delete_dependencies": (bool,),
"public_ids": ([str],),
}

attribute_map = {
"force_delete_dependencies": "force_delete_dependencies",
"public_ids": "public_ids",
}

def __init__(self_, public_ids: Union[List[str], UnsetType] = unset, **kwargs):
def __init__(
self_,
force_delete_dependencies: Union[bool, UnsetType] = unset,
public_ids: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
A JSON list of the ID or IDs of the Synthetic tests that you want
to delete.
:param force_delete_dependencies: Delete the Synthetic test even if it's referenced by other resources
(for example, SLOs and composite monitors).
:type force_delete_dependencies: bool, optional
:param public_ids: An array of Synthetic test IDs you want to delete.
:type public_ids: [str], optional
"""
if force_delete_dependencies is not unset:
kwargs["force_delete_dependencies"] = force_delete_dependencies
if public_ids is not unset:
kwargs["public_ids"] = public_ids
super().__init__(kwargs)
4 changes: 2 additions & 2 deletions tests/v1/features/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7b6fb69

Please sign in to comment.