Skip to content

Commit 86d3dfa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2b591c2 of spec repo
1 parent 06b2512 commit 86d3dfa

File tree

5 files changed

+216
-0
lines changed

5 files changed

+216
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60000,6 +60000,35 @@ paths:
6000060000
tags:
6000160001
- Error Tracking
6000260002
/api/v2/error-tracking/issues/{issue_id}/assignee:
60003+
delete:
60004+
description: Remove the assignee of an issue by `issue_id`.
60005+
operationId: DeleteIssueAssignee
60006+
parameters:
60007+
- $ref: '#/components/parameters/IssueIDPathParameter'
60008+
responses:
60009+
'204':
60010+
description: No Content
60011+
'400':
60012+
$ref: '#/components/responses/BadRequestResponse'
60013+
'401':
60014+
$ref: '#/components/responses/UnauthorizedResponse'
60015+
'403':
60016+
$ref: '#/components/responses/ForbiddenResponse'
60017+
'404':
60018+
$ref: '#/components/responses/NotFoundResponse'
60019+
'429':
60020+
$ref: '#/components/responses/TooManyRequestsResponse'
60021+
security:
60022+
- apiKeyAuth: []
60023+
appKeyAuth: []
60024+
- AuthZ:
60025+
- error_tracking_read
60026+
- error_tracking_write
60027+
- cases_read
60028+
- cases_write
60029+
summary: Remove the assignee of an issue
60030+
tags:
60031+
- Error Tracking
6000360032
put:
6000460033
description: Update the assignee of an issue by `issue_id`.
6000560034
operationId: UpdateIssueAssignee
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Remove the assignee of an issue returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.ErrorTrackingApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
ErrorTrackingApi apiInstance = new ErrorTrackingApi(defaultClient);
11+
12+
// there is a valid "issue" in the system
13+
String ISSUE_ID = System.getenv("ISSUE_ID");
14+
15+
try {
16+
apiInstance.deleteIssueAssignee(ISSUE_ID);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling ErrorTrackingApi#deleteIssueAssignee");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,140 @@ public void setApiClient(ApiClient apiClient) {
5050
this.apiClient = apiClient;
5151
}
5252

53+
/**
54+
* Remove the assignee of an issue.
55+
*
56+
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
57+
*
58+
* @param issueId The identifier of the issue. (required)
59+
* @throws ApiException if fails to make API call
60+
*/
61+
public void deleteIssueAssignee(String issueId) throws ApiException {
62+
deleteIssueAssigneeWithHttpInfo(issueId);
63+
}
64+
65+
/**
66+
* Remove the assignee of an issue.
67+
*
68+
* <p>See {@link #deleteIssueAssigneeWithHttpInfoAsync}.
69+
*
70+
* @param issueId The identifier of the issue. (required)
71+
* @return CompletableFuture
72+
*/
73+
public CompletableFuture<Void> deleteIssueAssigneeAsync(String issueId) {
74+
return deleteIssueAssigneeWithHttpInfoAsync(issueId)
75+
.thenApply(
76+
response -> {
77+
return response.getData();
78+
});
79+
}
80+
81+
/**
82+
* Remove the assignee of an issue by <code>issue_id</code>.
83+
*
84+
* @param issueId The identifier of the issue. (required)
85+
* @return ApiResponse&lt;Void&gt;
86+
* @throws ApiException if fails to make API call
87+
* @http.response.details
88+
* <table border="1">
89+
* <caption>Response details</caption>
90+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
91+
* <tr><td> 204 </td><td> No Content </td><td> - </td></tr>
92+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
93+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
94+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
95+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
96+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
97+
* </table>
98+
*/
99+
public ApiResponse<Void> deleteIssueAssigneeWithHttpInfo(String issueId) throws ApiException {
100+
Object localVarPostBody = null;
101+
102+
// verify the required parameter 'issueId' is set
103+
if (issueId == null) {
104+
throw new ApiException(
105+
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee");
106+
}
107+
// create path and map variables
108+
String localVarPath =
109+
"/api/v2/error-tracking/issues/{issue_id}/assignee"
110+
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));
111+
112+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
113+
114+
Invocation.Builder builder =
115+
apiClient.createBuilder(
116+
"v2.ErrorTrackingApi.deleteIssueAssignee",
117+
localVarPath,
118+
new ArrayList<Pair>(),
119+
localVarHeaderParams,
120+
new HashMap<String, String>(),
121+
new String[] {"*/*"},
122+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
123+
return apiClient.invokeAPI(
124+
"DELETE",
125+
builder,
126+
localVarHeaderParams,
127+
new String[] {},
128+
localVarPostBody,
129+
new HashMap<String, Object>(),
130+
false,
131+
null);
132+
}
133+
134+
/**
135+
* Remove the assignee of an issue.
136+
*
137+
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
138+
*
139+
* @param issueId The identifier of the issue. (required)
140+
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
141+
*/
142+
public CompletableFuture<ApiResponse<Void>> deleteIssueAssigneeWithHttpInfoAsync(String issueId) {
143+
Object localVarPostBody = null;
144+
145+
// verify the required parameter 'issueId' is set
146+
if (issueId == null) {
147+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
148+
result.completeExceptionally(
149+
new ApiException(
150+
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee"));
151+
return result;
152+
}
153+
// create path and map variables
154+
String localVarPath =
155+
"/api/v2/error-tracking/issues/{issue_id}/assignee"
156+
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));
157+
158+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
159+
160+
Invocation.Builder builder;
161+
try {
162+
builder =
163+
apiClient.createBuilder(
164+
"v2.ErrorTrackingApi.deleteIssueAssignee",
165+
localVarPath,
166+
new ArrayList<Pair>(),
167+
localVarHeaderParams,
168+
new HashMap<String, String>(),
169+
new String[] {"*/*"},
170+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
171+
} catch (ApiException ex) {
172+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
173+
result.completeExceptionally(ex);
174+
return result;
175+
}
176+
return apiClient.invokeAPIAsync(
177+
"DELETE",
178+
builder,
179+
localVarHeaderParams,
180+
new String[] {},
181+
localVarPostBody,
182+
new HashMap<String, Object>(),
183+
false,
184+
null);
185+
}
186+
53187
/** Manage optional parameters to getIssue. */
54188
public static class GetIssueOptionalParameters {
55189
private List<GetIssueIncludeQueryParameterItem> include;

src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ Feature: Error Tracking
3232
Then the response status is 200 OK
3333
And the response "data.id" is equal to "{{ issue.id }}"
3434

35+
@generated @skip @team:DataDog/error-tracking
36+
Scenario: Remove the assignee of an issue returns "Bad Request" response
37+
Given new "DeleteIssueAssignee" request
38+
And request contains "issue_id" parameter from "REPLACE.ME"
39+
When the request is sent
40+
Then the response status is 400 Bad Request
41+
42+
@team:DataDog/error-tracking
43+
Scenario: Remove the assignee of an issue returns "No Content" response
44+
Given new "DeleteIssueAssignee" request
45+
And there is a valid "issue" in the system
46+
And request contains "issue_id" parameter from "issue.id"
47+
When the request is sent
48+
Then the response status is 204 No Content
49+
50+
@team:DataDog/error-tracking
51+
Scenario: Remove the assignee of an issue returns "Not Found" response
52+
Given new "DeleteIssueAssignee" request
53+
And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737"
54+
When the request is sent
55+
Then the response status is 404 Not Found
56+
3557
@team:DataDog/error-tracking
3658
Scenario: Search error tracking issues returns "Bad Request" response
3759
Given new "SearchIssues" request

src/test/resources/com/datadog/api/client/v2/api/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,12 @@
12411241
"type": "safe"
12421242
}
12431243
},
1244+
"DeleteIssueAssignee": {
1245+
"tag": "Error Tracking",
1246+
"undo": {
1247+
"type": "idempotent"
1248+
}
1249+
},
12441250
"UpdateIssueAssignee": {
12451251
"tag": "Error Tracking",
12461252
"undo": {

0 commit comments

Comments
 (0)