Skip to content

Commit 58622ea

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2b591c2 of spec repo
1 parent c84f7b4 commit 58622ea

5 files changed

Lines changed: 114 additions & 0 deletions

File tree

.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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Remove the assignee of an issue returns "No Content" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi
8+
9+
# there is a valid "issue" in the system
10+
ISSUE_ID = environ["ISSUE_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = ErrorTrackingApi(api_client)
15+
api_instance.delete_issue_assignee(
16+
issue_id=ISSUE_ID,
17+
)

src/datadog_api_client/v2/api/error_tracking_api.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,29 @@ def __init__(self, api_client=None):
3030
api_client = ApiClient(Configuration())
3131
self.api_client = api_client
3232

33+
self._delete_issue_assignee_endpoint = _Endpoint(
34+
settings={
35+
"response_type": None,
36+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
37+
"endpoint_path": "/api/v2/error-tracking/issues/{issue_id}/assignee",
38+
"operation_id": "delete_issue_assignee",
39+
"http_method": "DELETE",
40+
"version": "v2",
41+
},
42+
params_map={
43+
"issue_id": {
44+
"required": True,
45+
"openapi_types": (str,),
46+
"attribute": "issue_id",
47+
"location": "path",
48+
},
49+
},
50+
headers_map={
51+
"accept": ["*/*"],
52+
},
53+
api_client=api_client,
54+
)
55+
3356
self._get_issue_endpoint = _Endpoint(
3457
settings={
3558
"response_type": (IssueResponse,),
@@ -137,6 +160,23 @@ def __init__(self, api_client=None):
137160
api_client=api_client,
138161
)
139162

163+
def delete_issue_assignee(
164+
self,
165+
issue_id: str,
166+
) -> None:
167+
"""Remove the assignee of an issue.
168+
169+
Remove the assignee of an issue by ``issue_id``.
170+
171+
:param issue_id: The identifier of the issue.
172+
:type issue_id: str
173+
:rtype: None
174+
"""
175+
kwargs: Dict[str, Any] = {}
176+
kwargs["issue_id"] = issue_id
177+
178+
return self._delete_issue_assignee_endpoint.call_with_http_info(**kwargs)
179+
140180
def get_issue(
141181
self,
142182
issue_id: str,

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

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