Skip to content

Commit cd23c9d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2b591c2 of spec repo
1 parent 6818a6f commit cd23c9d

File tree

6 files changed

+133
-0
lines changed

6 files changed

+133
-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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Remove the assignee of an issue returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ErrorTrackingAPI.new
5+
6+
# there is a valid "issue" in the system
7+
ISSUE_ID = ENV["ISSUE_ID"]
8+
api_instance.delete_issue_assignee(ISSUE_ID)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,9 @@
18341834
"issue_id" => "String",
18351835
"include" => "Array<GetIssueIncludeQueryParameterItem>",
18361836
},
1837+
"v2.DeleteIssueAssignee" => {
1838+
"issue_id" => "String",
1839+
},
18371840
"v2.UpdateIssueAssignee" => {
18381841
"issue_id" => "String",
18391842
"body" => "IssueUpdateAssigneeRequest",

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

features/v2/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": {

lib/datadog_api_client/v2/api/error_tracking_api.rb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,71 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
2323
@api_client = api_client
2424
end
2525

26+
# Remove the assignee of an issue.
27+
#
28+
# @see #delete_issue_assignee_with_http_info
29+
def delete_issue_assignee(issue_id, opts = {})
30+
delete_issue_assignee_with_http_info(issue_id, opts)
31+
nil
32+
end
33+
34+
# Remove the assignee of an issue.
35+
#
36+
# Remove the assignee of an issue by `issue_id`.
37+
#
38+
# @param issue_id [String] The identifier of the issue.
39+
# @param opts [Hash] the optional parameters
40+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41+
def delete_issue_assignee_with_http_info(issue_id, opts = {})
42+
43+
if @api_client.config.debugging
44+
@api_client.config.logger.debug 'Calling API: ErrorTrackingAPI.delete_issue_assignee ...'
45+
end
46+
# verify the required parameter 'issue_id' is set
47+
if @api_client.config.client_side_validation && issue_id.nil?
48+
fail ArgumentError, "Missing the required parameter 'issue_id' when calling ErrorTrackingAPI.delete_issue_assignee"
49+
end
50+
# resource path
51+
local_var_path = '/api/v2/error-tracking/issues/{issue_id}/assignee'.sub('{issue_id}', CGI.escape(issue_id.to_s).gsub('%2F', '/'))
52+
53+
# query parameters
54+
query_params = opts[:query_params] || {}
55+
56+
# header parameters
57+
header_params = opts[:header_params] || {}
58+
# HTTP header 'Accept' (if needed)
59+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60+
61+
# form parameters
62+
form_params = opts[:form_params] || {}
63+
64+
# http body (model)
65+
post_body = opts[:debug_body]
66+
67+
# return_type
68+
return_type = opts[:debug_return_type]
69+
70+
# auth_names
71+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
72+
73+
new_options = opts.merge(
74+
:operation => :delete_issue_assignee,
75+
:header_params => header_params,
76+
:query_params => query_params,
77+
:form_params => form_params,
78+
:body => post_body,
79+
:auth_names => auth_names,
80+
:return_type => return_type,
81+
:api_version => "V2"
82+
)
83+
84+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
85+
if @api_client.config.debugging
86+
@api_client.config.logger.debug "API called: ErrorTrackingAPI#delete_issue_assignee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87+
end
88+
return data, status_code, headers
89+
end
90+
2691
# Get the details of an error tracking issue.
2792
#
2893
# @see #get_issue_with_http_info

0 commit comments

Comments
 (0)