Skip to content

Commit fc444a3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ca200e0 of spec repo
1 parent e630eec commit fc444a3

File tree

7 files changed

+52
-50
lines changed

7 files changed

+52
-50
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.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public static void main(String[] args) {
2727
new FlakyTestsSearchRequestAttributes()
2828
.filter(
2929
new FlakyTestsSearchFilter()
30+
.includeHistory(true)
3031
.query(
3132
"""
3233
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
3334
"""))
34-
.includeHistory(true)
3535
.page(
3636
new FlakyTestsSearchPageOptions()
3737
.cursor(

examples/v2/test-optimization/SearchFlakyTests_1224086727.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public static void main(String[] args) {
2727
new FlakyTestsSearchRequestAttributes()
2828
.filter(
2929
new FlakyTestsSearchFilter()
30+
.includeHistory(true)
3031
.query(
3132
"""
3233
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
3334
"""))
34-
.includeHistory(true)
3535
.page(
3636
new FlakyTestsSearchPageOptions()
3737
.cursor(

examples/v2/test-optimization/SearchFlakyTests_209064879.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public static void main(String[] args) {
3030
.query(
3131
"""
3232
flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"
33-
"""))
33+
""")
34+
.includeHistory(true))
3435
.page(new FlakyTestsSearchPageOptions().limit(10L))
35-
.sort(FlakyTestsSearchSort.FQN_ASCENDING)
36-
.includeHistory(true))
36+
.sort(FlakyTestsSearchSort.FQN_ASCENDING))
3737
.type(FlakyTestsSearchRequestDataType.SEARCH_FLAKY_TESTS_REQUEST));
3838

3939
try {

src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchFilter.java

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,43 @@
1717
import java.util.Objects;
1818

1919
/** Search filter settings. */
20-
@JsonPropertyOrder({FlakyTestsSearchFilter.JSON_PROPERTY_QUERY})
20+
@JsonPropertyOrder({
21+
FlakyTestsSearchFilter.JSON_PROPERTY_INCLUDE_HISTORY,
22+
FlakyTestsSearchFilter.JSON_PROPERTY_QUERY
23+
})
2124
@jakarta.annotation.Generated(
2225
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2326
public class FlakyTestsSearchFilter {
2427
@JsonIgnore public boolean unparsed = false;
28+
public static final String JSON_PROPERTY_INCLUDE_HISTORY = "include_history";
29+
private Boolean includeHistory = false;
30+
2531
public static final String JSON_PROPERTY_QUERY = "query";
2632
private String query = "*";
2733

34+
public FlakyTestsSearchFilter includeHistory(Boolean includeHistory) {
35+
this.includeHistory = includeHistory;
36+
return this;
37+
}
38+
39+
/**
40+
* Whether to include the status change history for each flaky test in the response. When set to
41+
* true, each test will include a 'history' array with chronological status changes. Defaults to
42+
* false.
43+
*
44+
* @return includeHistory
45+
*/
46+
@jakarta.annotation.Nullable
47+
@JsonProperty(JSON_PROPERTY_INCLUDE_HISTORY)
48+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
49+
public Boolean getIncludeHistory() {
50+
return includeHistory;
51+
}
52+
53+
public void setIncludeHistory(Boolean includeHistory) {
54+
this.includeHistory = includeHistory;
55+
}
56+
2857
public FlakyTestsSearchFilter query(String query) {
2958
this.query = query;
3059
return this;
@@ -106,19 +135,21 @@ public boolean equals(Object o) {
106135
return false;
107136
}
108137
FlakyTestsSearchFilter flakyTestsSearchFilter = (FlakyTestsSearchFilter) o;
109-
return Objects.equals(this.query, flakyTestsSearchFilter.query)
138+
return Objects.equals(this.includeHistory, flakyTestsSearchFilter.includeHistory)
139+
&& Objects.equals(this.query, flakyTestsSearchFilter.query)
110140
&& Objects.equals(this.additionalProperties, flakyTestsSearchFilter.additionalProperties);
111141
}
112142

113143
@Override
114144
public int hashCode() {
115-
return Objects.hash(query, additionalProperties);
145+
return Objects.hash(includeHistory, query, additionalProperties);
116146
}
117147

118148
@Override
119149
public String toString() {
120150
StringBuilder sb = new StringBuilder();
121151
sb.append("class FlakyTestsSearchFilter {\n");
152+
sb.append(" includeHistory: ").append(toIndentedString(includeHistory)).append("\n");
122153
sb.append(" query: ").append(toIndentedString(query)).append("\n");
123154
sb.append(" additionalProperties: ")
124155
.append(toIndentedString(additionalProperties))

src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchRequestAttributes.java

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/** Attributes for the flaky tests search request. */
2020
@JsonPropertyOrder({
2121
FlakyTestsSearchRequestAttributes.JSON_PROPERTY_FILTER,
22-
FlakyTestsSearchRequestAttributes.JSON_PROPERTY_INCLUDE_HISTORY,
2322
FlakyTestsSearchRequestAttributes.JSON_PROPERTY_PAGE,
2423
FlakyTestsSearchRequestAttributes.JSON_PROPERTY_SORT
2524
})
@@ -30,9 +29,6 @@ public class FlakyTestsSearchRequestAttributes {
3029
public static final String JSON_PROPERTY_FILTER = "filter";
3130
private FlakyTestsSearchFilter filter;
3231

33-
public static final String JSON_PROPERTY_INCLUDE_HISTORY = "include_history";
34-
private Boolean includeHistory = false;
35-
3632
public static final String JSON_PROPERTY_PAGE = "page";
3733
private FlakyTestsSearchPageOptions page;
3834

@@ -61,29 +57,6 @@ public void setFilter(FlakyTestsSearchFilter filter) {
6157
this.filter = filter;
6258
}
6359

64-
public FlakyTestsSearchRequestAttributes includeHistory(Boolean includeHistory) {
65-
this.includeHistory = includeHistory;
66-
return this;
67-
}
68-
69-
/**
70-
* Whether to include the status change history for each flaky test in the response. When set to
71-
* true, each test will include a <code>history</code> array with chronological status changes.
72-
* Defaults to false.
73-
*
74-
* @return includeHistory
75-
*/
76-
@jakarta.annotation.Nullable
77-
@JsonProperty(JSON_PROPERTY_INCLUDE_HISTORY)
78-
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
79-
public Boolean getIncludeHistory() {
80-
return includeHistory;
81-
}
82-
83-
public void setIncludeHistory(Boolean includeHistory) {
84-
this.includeHistory = includeHistory;
85-
}
86-
8760
public FlakyTestsSearchRequestAttributes page(FlakyTestsSearchPageOptions page) {
8861
this.page = page;
8962
this.unparsed |= page.unparsed;
@@ -190,7 +163,6 @@ public boolean equals(Object o) {
190163
FlakyTestsSearchRequestAttributes flakyTestsSearchRequestAttributes =
191164
(FlakyTestsSearchRequestAttributes) o;
192165
return Objects.equals(this.filter, flakyTestsSearchRequestAttributes.filter)
193-
&& Objects.equals(this.includeHistory, flakyTestsSearchRequestAttributes.includeHistory)
194166
&& Objects.equals(this.page, flakyTestsSearchRequestAttributes.page)
195167
&& Objects.equals(this.sort, flakyTestsSearchRequestAttributes.sort)
196168
&& Objects.equals(
@@ -199,15 +171,14 @@ public boolean equals(Object o) {
199171

200172
@Override
201173
public int hashCode() {
202-
return Objects.hash(filter, includeHistory, page, sort, additionalProperties);
174+
return Objects.hash(filter, page, sort, additionalProperties);
203175
}
204176

205177
@Override
206178
public String toString() {
207179
StringBuilder sb = new StringBuilder();
208180
sb.append("class FlakyTestsSearchRequestAttributes {\n");
209181
sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
210-
sb.append(" includeHistory: ").append(toIndentedString(includeHistory)).append("\n");
211182
sb.append(" page: ").append(toIndentedString(page)).append("\n");
212183
sb.append(" sort: ").append(toIndentedString(sort)).append("\n");
213184
sb.append(" additionalProperties: ")

src/test/resources/com/datadog/api/client/v2/api/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)