Skip to content

Commit d131284

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit af303b9 of spec repo
1 parent b4117b6 commit d131284

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20959,6 +20959,8 @@ components:
2095920959
items:
2096020960
type: string
2096120961
type: array
20962+
required:
20963+
- excluded_resources
2096220964
type: object
2096320965
DeploymentRuleOptionsMonitor:
2096420966
additionalProperties: false

src/datadog_api_client/v2/model/deployment_rule_options_faulty_deployment_detection.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,18 @@ def openapi_types(_):
3030
"excluded_resources": "excluded_resources",
3131
}
3232

33-
def __init__(
34-
self_,
35-
duration: Union[int, UnsetType] = unset,
36-
excluded_resources: Union[List[str], UnsetType] = unset,
37-
**kwargs,
38-
):
33+
def __init__(self_, excluded_resources: List[str], duration: Union[int, UnsetType] = unset, **kwargs):
3934
"""
4035
Faulty deployment detection options for deployment rules.
4136
4237
:param duration: The duration for faulty deployment detection.
4338
:type duration: int, optional
4439
4540
:param excluded_resources: Resources to exclude from faulty deployment detection.
46-
:type excluded_resources: [str], optional
41+
:type excluded_resources: [str]
4742
"""
4843
if duration is not unset:
4944
kwargs["duration"] = duration
50-
if excluded_resources is not unset:
51-
kwargs["excluded_resources"] = excluded_resources
5245
super().__init__(kwargs)
46+
47+
self_.excluded_resources = excluded_resources

src/datadog_api_client/v2/model/deployment_rules_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, **kwargs):
1919
:type duration: int, optional
2020
2121
:param excluded_resources: Resources to exclude from faulty deployment detection.
22-
:type excluded_resources: [str], optional
22+
:type excluded_resources: [str]
2323
2424
:param query: Monitors that match this query are evaluated.
2525
:type query: str

tests/v2/features/deployment_gates.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Feature: Deployment Gates
6262
And body with value {"data": {"attributes": {"dry_run": false, "name": "My deployment rule", "options": {"excluded_resources": []}, "type": "faulty_deployment_detection"}, "type": "deployment_rule"}}
6363
When the request is sent
6464
Then the response status is 200 OK
65+
And the response "data.attributes.options.excluded_resources" is equal to []
6566

6667
@team:DataDog/ci-app-backend
6768
Scenario: Delete deployment gate returns "Bad Request" response
@@ -206,6 +207,7 @@ Feature: Deployment Gates
206207
And request contains "id" parameter from "deployment_rule.data.id"
207208
When the request is sent
208209
Then the response status is 200 OK
210+
And the response "data.attributes.options.excluded_resources" is equal to []
209211

210212
@generated @skip @team:DataDog/ci-app-backend
211213
Scenario: Get rules for a deployment gate returns "Bad request." response
@@ -304,3 +306,4 @@ Feature: Deployment Gates
304306
And body with value {"data": {"attributes": {"dry_run": false, "name": "Updated deployment rule", "options": {"excluded_resources": []}}, "type": "deployment_rule"}}
305307
When the request is sent
306308
Then the response status is 200 OK
309+
And the response "data.attributes.options.excluded_resources" is equal to []

0 commit comments

Comments
 (0)