Skip to content

Commit 8f40309

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ca200e0 of spec repo
1 parent 4ed6159 commit 8f40309

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25864,6 +25864,14 @@ components:
2586425864
FlakyTestsSearchFilter:
2586525865
description: Search filter settings.
2586625866
properties:
25867+
include_history:
25868+
default: false
25869+
description: |-
25870+
Whether to include the status change history for each flaky test in the response.
25871+
When set to true, each test will include a 'history' array with chronological status changes.
25872+
Defaults to false.
25873+
example: true
25874+
type: boolean
2586725875
query:
2586825876
default: "*"
2586925877
description: |-
@@ -25909,14 +25917,6 @@ components:
2590925917
properties:
2591025918
filter:
2591125919
$ref: "#/components/schemas/FlakyTestsSearchFilter"
25912-
include_history:
25913-
default: false
25914-
description: |-
25915-
Whether to include the status change history for each flaky test in the response.
25916-
When set to true, each test will include a `history` array with chronological status changes.
25917-
Defaults to false.
25918-
example: true
25919-
type: boolean
2592025920
page:
2592125921
$ref: "#/components/schemas/FlakyTestsSearchPageOptions"
2592225922
sort:

examples/v2/test-optimization/SearchFlakyTests.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
data: DatadogAPIClient::V2::FlakyTestsSearchRequestData.new({
1111
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
1212
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
13+
include_history: true,
1314
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
1415
}),
15-
include_history: true,
1616
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
1717
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
1818
limit: 25,

examples/v2/test-optimization/SearchFlakyTests_1224086727.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
data: DatadogAPIClient::V2::FlakyTestsSearchRequestData.new({
1111
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
1212
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
13+
include_history: true,
1314
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
1415
}),
15-
include_history: true,
1616
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
1717
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
1818
limit: 25,

examples/v2/test-optimization/SearchFlakyTests_209064879.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
1212
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
1313
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
14+
include_history: true,
1415
}),
1516
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
1617
limit: 10,
1718
}),
1819
sort: DatadogAPIClient::V2::FlakyTestsSearchSort::FQN_ASCENDING,
19-
include_history: true,
2020
}),
2121
type: DatadogAPIClient::V2::FlakyTestsSearchRequestDataType::SEARCH_FLAKY_TESTS_REQUEST,
2222
}),

features/v2/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

lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module DatadogAPIClient::V2
2121
class FlakyTestsSearchFilter
2222
include BaseGenericModel
2323

24+
# Whether to include the status change history for each flaky test in the response.
25+
# When set to true, each test will include a 'history' array with chronological status changes.
26+
# Defaults to false.
27+
attr_accessor :include_history
28+
2429
# Search query following log syntax used to filter flaky tests, same as on Flaky Tests Management UI. The supported search keys are:
2530
# - `flaky_test_state`
2631
# - `flaky_test_category`
@@ -40,6 +45,7 @@ class FlakyTestsSearchFilter
4045
# @!visibility private
4146
def self.attribute_map
4247
{
48+
:'include_history' => :'include_history',
4349
:'query' => :'query'
4450
}
4551
end
@@ -48,6 +54,7 @@ def self.attribute_map
4854
# @!visibility private
4955
def self.openapi_types
5056
{
57+
:'include_history' => :'Boolean',
5158
:'query' => :'String'
5259
}
5360
end
@@ -70,6 +77,10 @@ def initialize(attributes = {})
7077
end
7178
}
7279

80+
if attributes.key?(:'include_history')
81+
self.include_history = attributes[:'include_history']
82+
end
83+
7384
if attributes.key?(:'query')
7485
self.query = attributes[:'query']
7586
end
@@ -101,6 +112,7 @@ def to_hash
101112
def ==(o)
102113
return true if self.equal?(o)
103114
self.class == o.class &&
115+
include_history == o.include_history &&
104116
query == o.query &&
105117
additional_properties == o.additional_properties
106118
end
@@ -109,7 +121,7 @@ def ==(o)
109121
# @return [Integer] Hash code
110122
# @!visibility private
111123
def hash
112-
[query, additional_properties].hash
124+
[include_history, query, additional_properties].hash
113125
end
114126
end
115127
end

lib/datadog_api_client/v2/models/flaky_tests_search_request_attributes.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ class FlakyTestsSearchRequestAttributes
2424
# Search filter settings.
2525
attr_accessor :filter
2626

27-
# Whether to include the status change history for each flaky test in the response.
28-
# When set to true, each test will include a `history` array with chronological status changes.
29-
# Defaults to false.
30-
attr_accessor :include_history
31-
3227
# Pagination attributes for listing flaky tests.
3328
attr_accessor :page
3429

@@ -42,7 +37,6 @@ class FlakyTestsSearchRequestAttributes
4237
def self.attribute_map
4338
{
4439
:'filter' => :'filter',
45-
:'include_history' => :'include_history',
4640
:'page' => :'page',
4741
:'sort' => :'sort'
4842
}
@@ -53,7 +47,6 @@ def self.attribute_map
5347
def self.openapi_types
5448
{
5549
:'filter' => :'FlakyTestsSearchFilter',
56-
:'include_history' => :'Boolean',
5750
:'page' => :'FlakyTestsSearchPageOptions',
5851
:'sort' => :'FlakyTestsSearchSort'
5952
}
@@ -81,10 +74,6 @@ def initialize(attributes = {})
8174
self.filter = attributes[:'filter']
8275
end
8376

84-
if attributes.key?(:'include_history')
85-
self.include_history = attributes[:'include_history']
86-
end
87-
8877
if attributes.key?(:'page')
8978
self.page = attributes[:'page']
9079
end
@@ -121,7 +110,6 @@ def ==(o)
121110
return true if self.equal?(o)
122111
self.class == o.class &&
123112
filter == o.filter &&
124-
include_history == o.include_history &&
125113
page == o.page &&
126114
sort == o.sort &&
127115
additional_properties == o.additional_properties
@@ -131,7 +119,7 @@ def ==(o)
131119
# @return [Integer] Hash code
132120
# @!visibility private
133121
def hash
134-
[filter, include_history, page, sort, additional_properties].hash
122+
[filter, page, sort, additional_properties].hash
135123
end
136124
end
137125
end

0 commit comments

Comments
 (0)