Skip to content

Commit c94e39e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ebaa65e of spec repo
1 parent f18bf1b commit c94e39e

17 files changed

+1987
-7
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61289,6 +61289,129 @@ components:
6128961289
- name
6129061290
- options
6129161291
type: object
61292+
UpdateFlakyTestStateRequest:
61293+
description: Request to update the state of multiple flaky tests.
61294+
properties:
61295+
data:
61296+
$ref: '#/components/schemas/UpdateFlakyTestStateRequestData'
61297+
required:
61298+
- data
61299+
type: object
61300+
UpdateFlakyTestStateRequestAttributes:
61301+
description: Attributes for updating flaky test states.
61302+
properties:
61303+
tests:
61304+
description: List of flaky tests to update.
61305+
items:
61306+
$ref: '#/components/schemas/UpdateFlakyTestStateRequestTest'
61307+
type: array
61308+
required:
61309+
- tests
61310+
type: object
61311+
UpdateFlakyTestStateRequestData:
61312+
description: The JSON:API data for updating flaky test states.
61313+
properties:
61314+
attributes:
61315+
$ref: '#/components/schemas/UpdateFlakyTestStateRequestAttributes'
61316+
type:
61317+
$ref: '#/components/schemas/UpdateFlakyTestStateRequestDataType'
61318+
required:
61319+
- type
61320+
- attributes
61321+
type: object
61322+
UpdateFlakyTestStateRequestDataType:
61323+
description: The definition of `UpdateFlakyTestStateRequestDataType` object.
61324+
enum:
61325+
- update_flaky_test_state_request
61326+
example: update_flaky_test_state_request
61327+
type: string
61328+
x-enum-varnames:
61329+
- UPDATE_FLAKY_TEST_STATE_REQUEST
61330+
UpdateFlakyTestStateRequestTest:
61331+
description: A flaky test to update.
61332+
properties:
61333+
id:
61334+
description: The ID of the flaky test (FQN).
61335+
example: 4eb1887a8adb1847
61336+
type: string
61337+
new_state:
61338+
$ref: '#/components/schemas/UpdateFlakyTestStateRequestTestNewState'
61339+
required:
61340+
- id
61341+
- new_state
61342+
type: object
61343+
UpdateFlakyTestStateRequestTestNewState:
61344+
description: The new state to set for the flaky test.
61345+
enum:
61346+
- active
61347+
- quarantined
61348+
- disabled
61349+
- fixed
61350+
example: active
61351+
type: string
61352+
x-enum-varnames:
61353+
- ACTIVE
61354+
- QUARANTINED
61355+
- DISABLED
61356+
- FIXED
61357+
UpdateFlakyTestStateResponse:
61358+
description: Response object for updating flaky test states.
61359+
properties:
61360+
data:
61361+
$ref: '#/components/schemas/UpdateFlakyTestStateResponseData'
61362+
type: object
61363+
UpdateFlakyTestStateResponseAttributes:
61364+
description: Attributes for the update flaky test state response.
61365+
properties:
61366+
has_errors:
61367+
description: Whether any errors occurred during the update operation.
61368+
example: false
61369+
type: boolean
61370+
results:
61371+
description: Results of the update operation for each test.
61372+
items:
61373+
$ref: '#/components/schemas/UpdateFlakyTestStateResponseResult'
61374+
type: array
61375+
required:
61376+
- has_errors
61377+
- results
61378+
type: object
61379+
UpdateFlakyTestStateResponseData:
61380+
description: The JSON:API data for the update flaky test state response.
61381+
properties:
61382+
attributes:
61383+
$ref: '#/components/schemas/UpdateFlakyTestStateResponseAttributes'
61384+
id:
61385+
description: The ID of the response.
61386+
type: string
61387+
type:
61388+
$ref: '#/components/schemas/UpdateFlakyTestStateResponseDataType'
61389+
type: object
61390+
UpdateFlakyTestStateResponseDataType:
61391+
description: The definition of `UpdateFlakyTestStateResponseDataType` object.
61392+
enum:
61393+
- update_flaky_test_state_response
61394+
type: string
61395+
x-enum-varnames:
61396+
- UPDATE_FLAKY_TEST_STATE_RESPONSE
61397+
UpdateFlakyTestStateResponseResult:
61398+
description: Result of updating a single flaky test state.
61399+
properties:
61400+
error:
61401+
description: Error message if the update failed.
61402+
type: string
61403+
id:
61404+
description: The ID of the flaky test (FQN).
61405+
example: 4eb1887a8adb1847
61406+
type: string
61407+
success:
61408+
description: Whether the update was successful.
61409+
example: false
61410+
type: boolean
61411+
required:
61412+
- id
61413+
- success
61414+
type: object
6129261415
UpdateOnCallNotificationRuleRequest:
6129361416
description: A top-level wrapper for updating a notification rule for a user
6129461417
example:
@@ -63638,6 +63761,7 @@ components:
6363863761
teams_read: Read Teams data. A User with this permission can view Team
6363963762
names, metadata, and which Users are on each Team.
6364063763
test_optimization_read: View Test Optimization.
63764+
test_optimization_write: Modify Test Optimization.
6364163765
timeseries_query: Query Timeseries data.
6364263766
usage_read: View your organization's usage and usage attribution.
6364363767
user_access_invite: Invite other users to your organization.
@@ -94850,6 +94974,44 @@ paths:
9485094974
- incident_settings_write
9485194975
x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).'
9485294976
/api/v2/test/flaky-test-management/tests:
94977+
patch:
94978+
description: Update the state of multiple flaky tests in Flaky Test Management.
94979+
operationId: UpdateFlakyTestState
94980+
requestBody:
94981+
content:
94982+
application/json:
94983+
schema:
94984+
$ref: '#/components/schemas/UpdateFlakyTestStateRequest'
94985+
required: true
94986+
responses:
94987+
'200':
94988+
content:
94989+
application/json:
94990+
schema:
94991+
$ref: '#/components/schemas/UpdateFlakyTestStateResponse'
94992+
description: OK
94993+
'400':
94994+
$ref: '#/components/responses/BadRequestResponse'
94995+
'403':
94996+
$ref: '#/components/responses/NotAuthorizedResponse'
94997+
'429':
94998+
$ref: '#/components/responses/TooManyRequestsResponse'
94999+
security:
95000+
- apiKeyAuth: []
95001+
appKeyAuth: []
95002+
- AuthZ:
95003+
- test_optimization_write
95004+
summary: Update flaky test states
95005+
tags:
95006+
- Test Optimization
95007+
x-codegen-request-body-name: body
95008+
x-permission:
95009+
operator: OR
95010+
permissions:
95011+
- test_optimization_write
95012+
x-unstable: '**Note**: This endpoint is in preview and may be subject to change.
95013+
95014+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
9485395015
post:
9485495016
description: List endpoint returning flaky tests from Flaky Test Management.
9485595017
Results are paginated.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Update flaky test states returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.TestOptimizationApi;
6+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequest;
7+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequestAttributes;
8+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequestData;
9+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequestDataType;
10+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequestTest;
11+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateRequestTestNewState;
12+
import com.datadog.api.client.v2.model.UpdateFlakyTestStateResponse;
13+
import java.util.Collections;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
defaultClient.setUnstableOperationEnabled("v2.updateFlakyTestState", true);
19+
TestOptimizationApi apiInstance = new TestOptimizationApi(defaultClient);
20+
21+
UpdateFlakyTestStateRequest body =
22+
new UpdateFlakyTestStateRequest()
23+
.data(
24+
new UpdateFlakyTestStateRequestData()
25+
.attributes(
26+
new UpdateFlakyTestStateRequestAttributes()
27+
.tests(
28+
Collections.singletonList(
29+
new UpdateFlakyTestStateRequestTest()
30+
.id("4eb1887a8adb1847")
31+
.newState(UpdateFlakyTestStateRequestTestNewState.ACTIVE))))
32+
.type(UpdateFlakyTestStateRequestDataType.UPDATE_FLAKY_TEST_STATE_REQUEST));
33+
34+
try {
35+
UpdateFlakyTestStateResponse result = apiInstance.updateFlakyTestState(body);
36+
System.out.println(result);
37+
} catch (ApiException e) {
38+
System.err.println("Exception when calling TestOptimizationApi#updateFlakyTestState");
39+
System.err.println("Status code: " + e.getCode());
40+
System.err.println("Reason: " + e.getResponseBody());
41+
System.err.println("Response headers: " + e.getResponseHeaders());
42+
e.printStackTrace();
43+
}
44+
}
45+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ public class ApiClient {
924924
put("v2.listIncidentTeams", false);
925925
put("v2.updateIncidentTeam", false);
926926
put("v2.searchFlakyTests", false);
927+
put("v2.updateFlakyTestState", false);
927928
}
928929
};
929930
protected static final java.util.logging.Logger logger =

0 commit comments

Comments
 (0)