From a133a713d96cbb30d318fcbb0458d1e53a0c1873 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 12 Mar 2026 15:00:23 +0000 Subject: [PATCH] Regenerate client from commit b7e9aa0 of spec repo --- .generator/schemas/v2/openapi.yaml | 22 +++++------ .../test-optimization/SearchFlakyTests.java | 2 +- .../SearchFlakyTests_1224086727.java | 2 +- .../SearchFlakyTests_209064879.java | 6 +-- .../v2/model/FlakyTestsSearchFilter.java | 37 +++++++++++++++++-- .../FlakyTestsSearchRequestAttributes.java | 31 +--------------- .../client/v2/api/test_optimization.feature | 8 ++-- 7 files changed, 55 insertions(+), 53 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 12e9531700e..3685ee4efd4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -25661,6 +25661,17 @@ components: FlakyTestsSearchFilter: description: Search filter settings. properties: + include_history: + default: false + description: 'Whether to include the status change history for each flaky + test in the response. + + When set to true, each test will include a ''history'' array with chronological + status changes. + + Defaults to false.' + example: true + type: boolean query: default: '*' description: 'Search query following log syntax used to filter flaky tests, @@ -25716,17 +25727,6 @@ components: properties: filter: $ref: '#/components/schemas/FlakyTestsSearchFilter' - include_history: - default: false - description: 'Whether to include the status change history for each flaky - test in the response. - - When set to true, each test will include a `history` array with chronological - status changes. - - Defaults to false.' - example: true - type: boolean page: $ref: '#/components/schemas/FlakyTestsSearchPageOptions' sort: diff --git a/examples/v2/test-optimization/SearchFlakyTests.java b/examples/v2/test-optimization/SearchFlakyTests.java index 58650a27895..4c356007fa5 100644 --- a/examples/v2/test-optimization/SearchFlakyTests.java +++ b/examples/v2/test-optimization/SearchFlakyTests.java @@ -27,11 +27,11 @@ public static void main(String[] args) { new FlakyTestsSearchRequestAttributes() .filter( new FlakyTestsSearchFilter() + .includeHistory(true) .query( """ flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist" """)) - .includeHistory(true) .page( new FlakyTestsSearchPageOptions() .cursor( diff --git a/examples/v2/test-optimization/SearchFlakyTests_1224086727.java b/examples/v2/test-optimization/SearchFlakyTests_1224086727.java index 164ee6fe99f..cb08200d7fa 100644 --- a/examples/v2/test-optimization/SearchFlakyTests_1224086727.java +++ b/examples/v2/test-optimization/SearchFlakyTests_1224086727.java @@ -27,11 +27,11 @@ public static void main(String[] args) { new FlakyTestsSearchRequestAttributes() .filter( new FlakyTestsSearchFilter() + .includeHistory(true) .query( """ flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist" """)) - .includeHistory(true) .page( new FlakyTestsSearchPageOptions() .cursor( diff --git a/examples/v2/test-optimization/SearchFlakyTests_209064879.java b/examples/v2/test-optimization/SearchFlakyTests_209064879.java index f1b3d1462bc..ebef8c47cf2 100644 --- a/examples/v2/test-optimization/SearchFlakyTests_209064879.java +++ b/examples/v2/test-optimization/SearchFlakyTests_209064879.java @@ -30,10 +30,10 @@ public static void main(String[] args) { .query( """ flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist" -""")) +""") + .includeHistory(true)) .page(new FlakyTestsSearchPageOptions().limit(10L)) - .sort(FlakyTestsSearchSort.FQN_ASCENDING) - .includeHistory(true)) + .sort(FlakyTestsSearchSort.FQN_ASCENDING)) .type(FlakyTestsSearchRequestDataType.SEARCH_FLAKY_TESTS_REQUEST)); try { diff --git a/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchFilter.java b/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchFilter.java index e69ed3f25a0..7a6ceed2c35 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchFilter.java @@ -17,14 +17,43 @@ import java.util.Objects; /** Search filter settings. */ -@JsonPropertyOrder({FlakyTestsSearchFilter.JSON_PROPERTY_QUERY}) +@JsonPropertyOrder({ + FlakyTestsSearchFilter.JSON_PROPERTY_INCLUDE_HISTORY, + FlakyTestsSearchFilter.JSON_PROPERTY_QUERY +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class FlakyTestsSearchFilter { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCLUDE_HISTORY = "include_history"; + private Boolean includeHistory = false; + public static final String JSON_PROPERTY_QUERY = "query"; private String query = "*"; + public FlakyTestsSearchFilter includeHistory(Boolean includeHistory) { + this.includeHistory = includeHistory; + return this; + } + + /** + * Whether to include the status change history for each flaky test in the response. When set to + * true, each test will include a 'history' array with chronological status changes. Defaults to + * false. + * + * @return includeHistory + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_HISTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeHistory() { + return includeHistory; + } + + public void setIncludeHistory(Boolean includeHistory) { + this.includeHistory = includeHistory; + } + public FlakyTestsSearchFilter query(String query) { this.query = query; return this; @@ -106,19 +135,21 @@ public boolean equals(Object o) { return false; } FlakyTestsSearchFilter flakyTestsSearchFilter = (FlakyTestsSearchFilter) o; - return Objects.equals(this.query, flakyTestsSearchFilter.query) + return Objects.equals(this.includeHistory, flakyTestsSearchFilter.includeHistory) + && Objects.equals(this.query, flakyTestsSearchFilter.query) && Objects.equals(this.additionalProperties, flakyTestsSearchFilter.additionalProperties); } @Override public int hashCode() { - return Objects.hash(query, additionalProperties); + return Objects.hash(includeHistory, query, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FlakyTestsSearchFilter {\n"); + sb.append(" includeHistory: ").append(toIndentedString(includeHistory)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchRequestAttributes.java index b8c4e04d22e..eb6799104de 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FlakyTestsSearchRequestAttributes.java @@ -19,7 +19,6 @@ /** Attributes for the flaky tests search request. */ @JsonPropertyOrder({ FlakyTestsSearchRequestAttributes.JSON_PROPERTY_FILTER, - FlakyTestsSearchRequestAttributes.JSON_PROPERTY_INCLUDE_HISTORY, FlakyTestsSearchRequestAttributes.JSON_PROPERTY_PAGE, FlakyTestsSearchRequestAttributes.JSON_PROPERTY_SORT }) @@ -30,9 +29,6 @@ public class FlakyTestsSearchRequestAttributes { public static final String JSON_PROPERTY_FILTER = "filter"; private FlakyTestsSearchFilter filter; - public static final String JSON_PROPERTY_INCLUDE_HISTORY = "include_history"; - private Boolean includeHistory = false; - public static final String JSON_PROPERTY_PAGE = "page"; private FlakyTestsSearchPageOptions page; @@ -61,29 +57,6 @@ public void setFilter(FlakyTestsSearchFilter filter) { this.filter = filter; } - public FlakyTestsSearchRequestAttributes includeHistory(Boolean includeHistory) { - this.includeHistory = includeHistory; - return this; - } - - /** - * Whether to include the status change history for each flaky test in the response. When set to - * true, each test will include a history array with chronological status changes. - * Defaults to false. - * - * @return includeHistory - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDE_HISTORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeHistory() { - return includeHistory; - } - - public void setIncludeHistory(Boolean includeHistory) { - this.includeHistory = includeHistory; - } - public FlakyTestsSearchRequestAttributes page(FlakyTestsSearchPageOptions page) { this.page = page; this.unparsed |= page.unparsed; @@ -190,7 +163,6 @@ public boolean equals(Object o) { FlakyTestsSearchRequestAttributes flakyTestsSearchRequestAttributes = (FlakyTestsSearchRequestAttributes) o; return Objects.equals(this.filter, flakyTestsSearchRequestAttributes.filter) - && Objects.equals(this.includeHistory, flakyTestsSearchRequestAttributes.includeHistory) && Objects.equals(this.page, flakyTestsSearchRequestAttributes.page) && Objects.equals(this.sort, flakyTestsSearchRequestAttributes.sort) && Objects.equals( @@ -199,7 +171,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(filter, includeHistory, page, sort, additionalProperties); + return Objects.hash(filter, page, sort, additionalProperties); } @Override @@ -207,7 +179,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FlakyTestsSearchRequestAttributes {\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); - sb.append(" includeHistory: ").append(toIndentedString(includeHistory)).append("\n"); sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/test/resources/com/datadog/api/client/v2/api/test_optimization.feature b/src/test/resources/com/datadog/api/client/v2/api/test_optimization.feature index bbf7d87075e..1c0e758a1e8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/test_optimization.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/test_optimization.feature @@ -13,7 +13,7 @@ Feature: Test Optimization Scenario: Search flaky tests returns "Bad Request" response Given operation "SearchFlakyTests" enabled And new "SearchFlakyTests" request - 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"}} + 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"}} When the request is sent Then the response status is 400 Bad Request @@ -29,7 +29,7 @@ Feature: Test Optimization Scenario: Search flaky tests returns "OK" response Given operation "SearchFlakyTests" enabled And new "SearchFlakyTests" request - 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"}} + 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"}} When the request is sent Then the response status is 200 OK @@ -45,7 +45,7 @@ Feature: Test Optimization Scenario: Search flaky tests returns "OK" response with history Given operation "SearchFlakyTests" enabled And new "SearchFlakyTests" request - 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"}} + 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"}} When the request is sent Then the response status is 200 OK And the response "data[0].attributes" has field "history" @@ -57,7 +57,7 @@ Feature: Test Optimization Scenario: Search flaky tests returns "OK" response with pagination Given operation "SearchFlakyTests" enabled And new "SearchFlakyTests" request - 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"}} + 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"}} When the request with pagination is sent Then the response status is 200 OK