Skip to content

Commit 6bbb950

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b6c6db8 of spec repo
1 parent 4098def commit 6bbb950

9 files changed

Lines changed: 76 additions & 58 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25834,6 +25834,14 @@ components:
2583425834
FlakyTestsSearchFilter:
2583525835
description: Search filter settings.
2583625836
properties:
25837+
include_history:
25838+
default: false
25839+
description: |-
25840+
Whether to include the status change history for each flaky test in the response.
25841+
When set to true, each test will include a 'history' array with chronological status changes.
25842+
Defaults to false.
25843+
example: true
25844+
type: boolean
2583725845
query:
2583825846
default: "*"
2583925847
description: |-
@@ -25879,14 +25887,6 @@ components:
2587925887
properties:
2588025888
filter:
2588125889
$ref: "#/components/schemas/FlakyTestsSearchFilter"
25882-
include_history:
25883-
default: false
25884-
description: |-
25885-
Whether to include the status change history for each flaky test in the response.
25886-
When set to true, each test will include a `history` array with chronological status changes.
25887-
Defaults to false.
25888-
example: true
25889-
type: boolean
2589025890
page:
2589125891
$ref: "#/components/schemas/FlakyTestsSearchPageOptions"
2589225892
sort:
@@ -57944,7 +57944,6 @@ components:
5794457944
- none
5794557945
- false_positive
5794657946
- testing_or_maintenance
57947-
- remediated
5794857947
- investigated_case_opened
5794957948
- true_positive_benign
5795057949
- true_positive_malicious
@@ -57954,7 +57953,6 @@ components:
5795457953
- NONE
5795557954
- FALSE_POSITIVE
5795657955
- TESTING_OR_MAINTENANCE
57957-
- REMEDIATED
5795857956
- INVESTIGATED_CASE_OPENED
5795957957
- TRUE_POSITIVE_BENIGN
5796057958
- TRUE_POSITIVE_MALICIOUS
@@ -103307,8 +103305,6 @@ paths:
103307103305
schema:
103308103306
$ref: "#/components/schemas/SecurityMonitoringSignalResponse"
103309103307
description: OK
103310-
"403":
103311-
$ref: "#/components/responses/NotAuthorizedResponse"
103312103308
"404":
103313103309
$ref: "#/components/responses/NotFoundResponse"
103314103310
"429":
@@ -103346,17 +103342,25 @@ paths:
103346103342
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103347103343
description: OK
103348103344
"400":
103349-
$ref: "#/components/responses/BadRequestResponse"
103345+
content:
103346+
application/json:
103347+
schema:
103348+
$ref: "#/components/schemas/APIErrorResponse"
103349+
description: Bad Request
103350103350
"403":
103351-
$ref: "#/components/responses/NotAuthorizedResponse"
103351+
content:
103352+
application/json:
103353+
schema:
103354+
$ref: "#/components/schemas/APIErrorResponse"
103355+
description: Forbidden
103352103356
"404":
103353-
$ref: "#/components/responses/NotFoundResponse"
103357+
content:
103358+
application/json:
103359+
schema:
103360+
$ref: "#/components/schemas/APIErrorResponse"
103361+
description: Not Found
103354103362
"429":
103355103363
$ref: "#/components/responses/TooManyRequestsResponse"
103356-
security:
103357-
- apiKeyAuth: []
103358-
appKeyAuth: []
103359-
- AuthZ: []
103360103364
summary: Modify the triage assignee of a security signal
103361103365
tags: ["Security Monitoring"]
103362103366
x-codegen-request-body-name: body
@@ -103386,17 +103390,25 @@ paths:
103386103390
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103387103391
description: OK
103388103392
"400":
103389-
$ref: "#/components/responses/BadRequestResponse"
103393+
content:
103394+
application/json:
103395+
schema:
103396+
$ref: "#/components/schemas/APIErrorResponse"
103397+
description: Bad Request
103390103398
"403":
103391-
$ref: "#/components/responses/NotAuthorizedResponse"
103399+
content:
103400+
application/json:
103401+
schema:
103402+
$ref: "#/components/schemas/APIErrorResponse"
103403+
description: Forbidden
103392103404
"404":
103393-
$ref: "#/components/responses/NotFoundResponse"
103405+
content:
103406+
application/json:
103407+
schema:
103408+
$ref: "#/components/schemas/APIErrorResponse"
103409+
description: Not Found
103394103410
"429":
103395103411
$ref: "#/components/responses/TooManyRequestsResponse"
103396-
security:
103397-
- apiKeyAuth: []
103398-
appKeyAuth: []
103399-
- AuthZ: []
103400103412
summary: Change the related incidents of a security signal
103401103413
tags: ["Security Monitoring"]
103402103414
x-codegen-request-body-name: body
@@ -103426,17 +103438,25 @@ paths:
103426103438
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
103427103439
description: OK
103428103440
"400":
103429-
$ref: "#/components/responses/BadRequestResponse"
103441+
content:
103442+
application/json:
103443+
schema:
103444+
$ref: "#/components/schemas/APIErrorResponse"
103445+
description: Bad Request
103430103446
"403":
103431-
$ref: "#/components/responses/NotAuthorizedResponse"
103447+
content:
103448+
application/json:
103449+
schema:
103450+
$ref: "#/components/schemas/APIErrorResponse"
103451+
description: Forbidden
103432103452
"404":
103433-
$ref: "#/components/responses/NotFoundResponse"
103453+
content:
103454+
application/json:
103455+
schema:
103456+
$ref: "#/components/schemas/APIErrorResponse"
103457+
description: Not Found
103434103458
"429":
103435103459
$ref: "#/components/responses/TooManyRequestsResponse"
103436-
security:
103437-
- apiKeyAuth: []
103438-
appKeyAuth: []
103439-
- AuthZ: []
103440103460
summary: Change the triage state of a security signal
103441103461
tags: ["Security Monitoring"]
103442103462
x-codegen-request-body-name: body

examples/v2/test-optimization/SearchFlakyTests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
data=FlakyTestsSearchRequestData(
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
19+
include_history=True,
1920
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
2021
),
21-
include_history=True,
2222
page=FlakyTestsSearchPageOptions(
2323
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
2424
limit=25,

examples/v2/test-optimization/SearchFlakyTests_1224086727.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
data=FlakyTestsSearchRequestData(
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
19+
include_history=True,
1920
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
2021
),
21-
include_history=True,
2222
page=FlakyTestsSearchPageOptions(
2323
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
2424
limit=25,

examples/v2/test-optimization/SearchFlakyTests_209064879.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
1919
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
20+
include_history=True,
2021
),
2122
page=FlakyTestsSearchPageOptions(
2223
limit=10,
2324
),
2425
sort=FlakyTestsSearchSort.FQN_ASCENDING,
25-
include_history=True,
2626
),
2727
type=FlakyTestsSearchRequestDataType.SEARCH_FLAKY_TESTS_REQUEST,
2828
),

src/datadog_api_client/v2/api/security_monitoring_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def __init__(self, api_client=None):
750750
self._edit_security_monitoring_signal_assignee_endpoint = _Endpoint(
751751
settings={
752752
"response_type": (SecurityMonitoringSignalTriageUpdateResponse,),
753-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
753+
"auth": ["apiKeyAuth", "appKeyAuth"],
754754
"endpoint_path": "/api/v2/security_monitoring/signals/{signal_id}/assignee",
755755
"operation_id": "edit_security_monitoring_signal_assignee",
756756
"http_method": "PATCH",
@@ -776,7 +776,7 @@ def __init__(self, api_client=None):
776776
self._edit_security_monitoring_signal_incidents_endpoint = _Endpoint(
777777
settings={
778778
"response_type": (SecurityMonitoringSignalTriageUpdateResponse,),
779-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
779+
"auth": ["apiKeyAuth", "appKeyAuth"],
780780
"endpoint_path": "/api/v2/security_monitoring/signals/{signal_id}/incidents",
781781
"operation_id": "edit_security_monitoring_signal_incidents",
782782
"http_method": "PATCH",
@@ -802,7 +802,7 @@ def __init__(self, api_client=None):
802802
self._edit_security_monitoring_signal_state_endpoint = _Endpoint(
803803
settings={
804804
"response_type": (SecurityMonitoringSignalTriageUpdateResponse,),
805-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
805+
"auth": ["apiKeyAuth", "appKeyAuth"],
806806
"endpoint_path": "/api/v2/security_monitoring/signals/{signal_id}/state",
807807
"operation_id": "edit_security_monitoring_signal_state",
808808
"http_method": "PATCH",

src/datadog_api_client/v2/model/flaky_tests_search_filter.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,26 @@ class FlakyTestsSearchFilter(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"include_history": (bool,),
2021
"query": (str,),
2122
}
2223

2324
attribute_map = {
25+
"include_history": "include_history",
2426
"query": "query",
2527
}
2628

27-
def __init__(self_, query: Union[str, UnsetType] = unset, **kwargs):
29+
def __init__(
30+
self_, include_history: Union[bool, UnsetType] = unset, query: Union[str, UnsetType] = unset, **kwargs
31+
):
2832
"""
2933
Search filter settings.
3034
35+
:param include_history: Whether to include the status change history for each flaky test in the response.
36+
When set to true, each test will include a 'history' array with chronological status changes.
37+
Defaults to false.
38+
:type include_history: bool, optional
39+
3140
:param query: Search query following log syntax used to filter flaky tests, same as on Flaky Tests Management UI. The supported search keys are:
3241
3342
* ``flaky_test_state``
@@ -42,6 +51,8 @@ def __init__(self_, query: Union[str, UnsetType] = unset, **kwargs):
4251
* ``env``
4352
:type query: str, optional
4453
"""
54+
if include_history is not unset:
55+
kwargs["include_history"] = include_history
4556
if query is not unset:
4657
kwargs["query"] = query
4758
super().__init__(kwargs)

src/datadog_api_client/v2/model/flaky_tests_search_request_attributes.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,19 @@ def openapi_types(_):
2828

2929
return {
3030
"filter": (FlakyTestsSearchFilter,),
31-
"include_history": (bool,),
3231
"page": (FlakyTestsSearchPageOptions,),
3332
"sort": (FlakyTestsSearchSort,),
3433
}
3534

3635
attribute_map = {
3736
"filter": "filter",
38-
"include_history": "include_history",
3937
"page": "page",
4038
"sort": "sort",
4139
}
4240

4341
def __init__(
4442
self_,
4543
filter: Union[FlakyTestsSearchFilter, UnsetType] = unset,
46-
include_history: Union[bool, UnsetType] = unset,
4744
page: Union[FlakyTestsSearchPageOptions, UnsetType] = unset,
4845
sort: Union[FlakyTestsSearchSort, UnsetType] = unset,
4946
**kwargs,
@@ -54,11 +51,6 @@ def __init__(
5451
:param filter: Search filter settings.
5552
:type filter: FlakyTestsSearchFilter, optional
5653
57-
:param include_history: Whether to include the status change history for each flaky test in the response.
58-
When set to true, each test will include a ``history`` array with chronological status changes.
59-
Defaults to false.
60-
:type include_history: bool, optional
61-
6254
:param page: Pagination attributes for listing flaky tests.
6355
:type page: FlakyTestsSearchPageOptions, optional
6456
@@ -67,8 +59,6 @@ def __init__(
6759
"""
6860
if filter is not unset:
6961
kwargs["filter"] = filter
70-
if include_history is not unset:
71-
kwargs["include_history"] = include_history
7262
if page is not unset:
7363
kwargs["page"] = page
7464
if sort is not unset:

src/datadog_api_client/v2/model/security_monitoring_signal_archive_reason.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ class SecurityMonitoringSignalArchiveReason(ModelSimple):
1616
"""
1717
Reason a signal is archived.
1818
19-
:param value: Must be one of ["none", "false_positive", "testing_or_maintenance", "remediated", "investigated_case_opened", "true_positive_benign", "true_positive_malicious", "other"].
19+
:param value: Must be one of ["none", "false_positive", "testing_or_maintenance", "investigated_case_opened", "true_positive_benign", "true_positive_malicious", "other"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"none",
2525
"false_positive",
2626
"testing_or_maintenance",
27-
"remediated",
2827
"investigated_case_opened",
2928
"true_positive_benign",
3029
"true_positive_malicious",
@@ -33,7 +32,6 @@ class SecurityMonitoringSignalArchiveReason(ModelSimple):
3332
NONE: ClassVar["SecurityMonitoringSignalArchiveReason"]
3433
FALSE_POSITIVE: ClassVar["SecurityMonitoringSignalArchiveReason"]
3534
TESTING_OR_MAINTENANCE: ClassVar["SecurityMonitoringSignalArchiveReason"]
36-
REMEDIATED: ClassVar["SecurityMonitoringSignalArchiveReason"]
3735
INVESTIGATED_CASE_OPENED: ClassVar["SecurityMonitoringSignalArchiveReason"]
3836
TRUE_POSITIVE_BENIGN: ClassVar["SecurityMonitoringSignalArchiveReason"]
3937
TRUE_POSITIVE_MALICIOUS: ClassVar["SecurityMonitoringSignalArchiveReason"]
@@ -51,7 +49,6 @@ def openapi_types(_):
5149
SecurityMonitoringSignalArchiveReason.TESTING_OR_MAINTENANCE = SecurityMonitoringSignalArchiveReason(
5250
"testing_or_maintenance"
5351
)
54-
SecurityMonitoringSignalArchiveReason.REMEDIATED = SecurityMonitoringSignalArchiveReason("remediated")
5552
SecurityMonitoringSignalArchiveReason.INVESTIGATED_CASE_OPENED = SecurityMonitoringSignalArchiveReason(
5653
"investigated_case_opened"
5754
)

tests/v2/features/test_optimization.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Feature: Test Optimization
8585
Scenario: Search flaky tests returns "Bad Request" response
8686
Given operation "SearchFlakyTests" enabled
8787
And new "SearchFlakyTests" request
88-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
88+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
8989
When the request is sent
9090
Then the response status is 400 Bad Request
9191

@@ -101,7 +101,7 @@ Feature: Test Optimization
101101
Scenario: Search flaky tests returns "OK" response
102102
Given operation "SearchFlakyTests" enabled
103103
And new "SearchFlakyTests" request
104-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
104+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
105105
When the request is sent
106106
Then the response status is 200 OK
107107

@@ -117,7 +117,7 @@ Feature: Test Optimization
117117
Scenario: Search flaky tests returns "OK" response with history
118118
Given operation "SearchFlakyTests" enabled
119119
And new "SearchFlakyTests" request
120-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"limit": 10}, "sort": "fqn", "include_history": true}, "type": "search_flaky_tests_request"}}
120+
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\"", "include_history": true}, "page": {"limit": 10}, "sort": "fqn"}, "type": "search_flaky_tests_request"}}
121121
When the request is sent
122122
Then the response status is 200 OK
123123
And the response "data[0].attributes" has field "history"
@@ -129,7 +129,7 @@ Feature: Test Optimization
129129
Scenario: Search flaky tests returns "OK" response with pagination
130130
Given operation "SearchFlakyTests" enabled
131131
And new "SearchFlakyTests" request
132-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
132+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
133133
When the request with pagination is sent
134134
Then the response status is 200 OK
135135

0 commit comments

Comments
 (0)