Skip to content

Commit aeccebc

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 9de14f7 of spec repo (#3598)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 724b6d5 commit aeccebc

24 files changed

Lines changed: 1581 additions & 61 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 239 additions & 35 deletions
Large diffs are not rendered by default.

examples/v2/incidents/CreateIncidentPostmortemTemplate.rb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,30 @@
99
body = DatadogAPIClient::V2::PostmortemTemplateRequest.new({
1010
data: DatadogAPIClient::V2::PostmortemTemplateDataRequest.new({
1111
attributes: DatadogAPIClient::V2::PostmortemTemplateAttributesRequest.new({
12+
confluence_postmortem_settings: DatadogAPIClient::V2::ConfluencePostmortemSettings.new({
13+
account_id: "123456",
14+
parent_id: "345678",
15+
space_id: "789012",
16+
}),
17+
content: '# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items',
18+
google_docs_postmortem_settings: DatadogAPIClient::V2::GoogleDocsPostmortemSettings.new({
19+
account_id: "123456",
20+
parent_folder_id: "789012",
21+
}),
22+
is_default: "2024-01-01T00:00:00+00:00",
23+
location: DatadogAPIClient::V2::PostmortemTemplateLocation::DATADOG_NOTEBOOKS,
1224
name: "Standard Postmortem Template",
1325
}),
14-
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATE,
26+
id: "00000000-0000-0000-0000-000000000000",
27+
relationships: DatadogAPIClient::V2::PostmortemTemplateCreateRelationships.new({
28+
incident_type: DatadogAPIClient::V2::PostmortemTemplateIncidentTypeRelationship.new({
29+
data: DatadogAPIClient::V2::PostmortemTemplateIncidentTypeRelationshipData.new({
30+
id: "00000000-0000-0000-0000-000000000009",
31+
type: "incident_types",
32+
}),
33+
}),
34+
}),
35+
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATES,
1536
}),
1637
})
1738
p api_instance.create_incident_postmortem_template(body)

examples/v2/incidents/DeleteIncidentPostmortemTemplate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
config.unstable_operations["v2.delete_incident_postmortem_template".to_sym] = true
66
end
77
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8-
api_instance.delete_incident_postmortem_template("template-456")
8+
api_instance.delete_incident_postmortem_template("template_id")

examples/v2/incidents/GetIncidentPostmortemTemplate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
config.unstable_operations["v2.get_incident_postmortem_template".to_sym] = true
66
end
77
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8-
p api_instance.get_incident_postmortem_template("template-456")
8+
p api_instance.get_incident_postmortem_template("template_id")

examples/v2/incidents/UpdateIncidentPostmortemTemplate.rb

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,30 @@
99
body = DatadogAPIClient::V2::PostmortemTemplateRequest.new({
1010
data: DatadogAPIClient::V2::PostmortemTemplateDataRequest.new({
1111
attributes: DatadogAPIClient::V2::PostmortemTemplateAttributesRequest.new({
12+
confluence_postmortem_settings: DatadogAPIClient::V2::ConfluencePostmortemSettings.new({
13+
account_id: "123456",
14+
parent_id: "345678",
15+
space_id: "789012",
16+
}),
17+
content: '# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items',
18+
google_docs_postmortem_settings: DatadogAPIClient::V2::GoogleDocsPostmortemSettings.new({
19+
account_id: "123456",
20+
parent_folder_id: "789012",
21+
}),
22+
is_default: "2024-01-01T00:00:00+00:00",
23+
location: DatadogAPIClient::V2::PostmortemTemplateLocation::DATADOG_NOTEBOOKS,
1224
name: "Standard Postmortem Template",
1325
}),
14-
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATE,
26+
id: "00000000-0000-0000-0000-000000000000",
27+
relationships: DatadogAPIClient::V2::PostmortemTemplateCreateRelationships.new({
28+
incident_type: DatadogAPIClient::V2::PostmortemTemplateIncidentTypeRelationship.new({
29+
data: DatadogAPIClient::V2::PostmortemTemplateIncidentTypeRelationshipData.new({
30+
id: "00000000-0000-0000-0000-000000000009",
31+
type: "incident_types",
32+
}),
33+
}),
34+
}),
35+
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATES,
1536
}),
1637
})
17-
p api_instance.update_incident_postmortem_template("template-456", body)
38+
p api_instance.update_incident_postmortem_template("template_id", body)

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3551,6 +3551,10 @@
35513551
"include" => "String",
35523552
"body" => "PatchIncidentNotificationTemplateRequest",
35533553
},
3554+
"v2.ListIncidentPostmortemTemplates" => {
3555+
"filter_incident_type" => "UUID",
3556+
"sort" => "String",
3557+
},
35543558
"v2.CreateIncidentPostmortemTemplate" => {
35553559
"body" => "PostmortemTemplateRequest",
35563560
},

features/v2/incidents.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,15 @@ Feature: Incidents
334334
Scenario: Create postmortem template returns "Bad Request" response
335335
Given operation "CreateIncidentPostmortemTemplate" enabled
336336
And new "CreateIncidentPostmortemTemplate" request
337-
And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}}
337+
And body with value {"data": {"attributes": {"confluence_postmortem_settings": {"account_id": "123456", "parent_id": "345678", "space_id": "789012"}, "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items", "google_docs_postmortem_settings": {"account_id": "123456", "parent_folder_id": "789012"}, "is_default": "2024-01-01T00:00:00+00:00", "location": "datadog_notebooks", "name": "Standard Postmortem Template"}, "id": "00000000-0000-0000-0000-000000000000", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000009", "type": "incident_types"}}}, "type": "postmortem_templates"}}
338338
When the request is sent
339339
Then the response status is 400 Bad Request
340340

341341
@generated @skip @team:DataDog/incident-app
342342
Scenario: Create postmortem template returns "Created" response
343343
Given operation "CreateIncidentPostmortemTemplate" enabled
344344
And new "CreateIncidentPostmortemTemplate" request
345-
And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}}
345+
And body with value {"data": {"attributes": {"confluence_postmortem_settings": {"account_id": "123456", "parent_id": "345678", "space_id": "789012"}, "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items", "google_docs_postmortem_settings": {"account_id": "123456", "parent_folder_id": "789012"}, "is_default": "2024-01-01T00:00:00+00:00", "location": "datadog_notebooks", "name": "Standard Postmortem Template"}, "id": "00000000-0000-0000-0000-000000000000", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000009", "type": "incident_types"}}}, "type": "postmortem_templates"}}
346346
When the request is sent
347347
Then the response status is 201 Created
348348

@@ -1590,7 +1590,7 @@ Feature: Incidents
15901590
Given operation "UpdateIncidentPostmortemTemplate" enabled
15911591
And new "UpdateIncidentPostmortemTemplate" request
15921592
And request contains "template_id" parameter from "REPLACE.ME"
1593-
And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}}
1593+
And body with value {"data": {"attributes": {"confluence_postmortem_settings": {"account_id": "123456", "parent_id": "345678", "space_id": "789012"}, "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items", "google_docs_postmortem_settings": {"account_id": "123456", "parent_folder_id": "789012"}, "is_default": "2024-01-01T00:00:00+00:00", "location": "datadog_notebooks", "name": "Standard Postmortem Template"}, "id": "00000000-0000-0000-0000-000000000000", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000009", "type": "incident_types"}}}, "type": "postmortem_templates"}}
15941594
When the request is sent
15951595
Then the response status is 400 Bad Request
15961596

@@ -1599,7 +1599,7 @@ Feature: Incidents
15991599
Given operation "UpdateIncidentPostmortemTemplate" enabled
16001600
And new "UpdateIncidentPostmortemTemplate" request
16011601
And request contains "template_id" parameter from "REPLACE.ME"
1602-
And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}}
1602+
And body with value {"data": {"attributes": {"confluence_postmortem_settings": {"account_id": "123456", "parent_id": "345678", "space_id": "789012"}, "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items", "google_docs_postmortem_settings": {"account_id": "123456", "parent_folder_id": "789012"}, "is_default": "2024-01-01T00:00:00+00:00", "location": "datadog_notebooks", "name": "Standard Postmortem Template"}, "id": "00000000-0000-0000-0000-000000000000", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000009", "type": "incident_types"}}}, "type": "postmortem_templates"}}
16031603
When the request is sent
16041604
Then the response status is 404 Not Found
16051605

@@ -1608,6 +1608,6 @@ Feature: Incidents
16081608
Given operation "UpdateIncidentPostmortemTemplate" enabled
16091609
And new "UpdateIncidentPostmortemTemplate" request
16101610
And request contains "template_id" parameter from "REPLACE.ME"
1611-
And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}}
1611+
And body with value {"data": {"attributes": {"confluence_postmortem_settings": {"account_id": "123456", "parent_id": "345678", "space_id": "789012"}, "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items", "google_docs_postmortem_settings": {"account_id": "123456", "parent_folder_id": "789012"}, "is_default": "2024-01-01T00:00:00+00:00", "location": "datadog_notebooks", "name": "Standard Postmortem Template"}, "id": "00000000-0000-0000-0000-000000000000", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000009", "type": "incident_types"}}}, "type": "postmortem_templates"}}
16121612
When the request is sent
16131613
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3047,7 +3047,7 @@
30473047
"parameters": [
30483048
{
30493049
"name": "template_id",
3050-
"source": "<RESPONSE_PATH>"
3050+
"source": "data.id"
30513051
}
30523052
],
30533053
"type": "unsafe"

lib/datadog_api_client/inflector.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,7 @@ def overrides
22682268
"v2.configured_schedule_target_relationships" => "ConfiguredScheduleTargetRelationships",
22692269
"v2.configured_schedule_target_relationships_schedule" => "ConfiguredScheduleTargetRelationshipsSchedule",
22702270
"v2.configured_schedule_target_type" => "ConfiguredScheduleTargetType",
2271+
"v2.confluence_postmortem_settings" => "ConfluencePostmortemSettings",
22712272
"v2.confluent_account_create_request" => "ConfluentAccountCreateRequest",
22722273
"v2.confluent_account_create_request_attributes" => "ConfluentAccountCreateRequestAttributes",
22732274
"v2.confluent_account_create_request_data" => "ConfluentAccountCreateRequestData",
@@ -3658,6 +3659,7 @@ def overrides
36583659
"v2.google_chat_update_organization_handle_request" => "GoogleChatUpdateOrganizationHandleRequest",
36593660
"v2.google_chat_update_organization_handle_request_attributes" => "GoogleChatUpdateOrganizationHandleRequestAttributes",
36603661
"v2.google_chat_update_organization_handle_request_data" => "GoogleChatUpdateOrganizationHandleRequestData",
3662+
"v2.google_docs_postmortem_settings" => "GoogleDocsPostmortemSettings",
36613663
"v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference",
36623664
"v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData",
36633665
"v2.governance_best_practice_definition" => "GovernanceBestPracticeDefinition",
@@ -5775,12 +5777,19 @@ def overrides
57755777
"v2.postmortem_cell_type" => "PostmortemCellType",
57765778
"v2.postmortem_template_attributes_request" => "PostmortemTemplateAttributesRequest",
57775779
"v2.postmortem_template_attributes_response" => "PostmortemTemplateAttributesResponse",
5780+
"v2.postmortem_template_create_relationships" => "PostmortemTemplateCreateRelationships",
57785781
"v2.postmortem_template_data_request" => "PostmortemTemplateDataRequest",
57795782
"v2.postmortem_template_data_response" => "PostmortemTemplateDataResponse",
5783+
"v2.postmortem_template_incident_type_relationship" => "PostmortemTemplateIncidentTypeRelationship",
5784+
"v2.postmortem_template_incident_type_relationship_data" => "PostmortemTemplateIncidentTypeRelationshipData",
5785+
"v2.postmortem_template_location" => "PostmortemTemplateLocation",
57805786
"v2.postmortem_template_request" => "PostmortemTemplateRequest",
57815787
"v2.postmortem_template_response" => "PostmortemTemplateResponse",
5788+
"v2.postmortem_template_response_relationships" => "PostmortemTemplateResponseRelationships",
57825789
"v2.postmortem_templates_response" => "PostmortemTemplatesResponse",
57835790
"v2.postmortem_template_type" => "PostmortemTemplateType",
5791+
"v2.postmortem_template_user_relationship" => "PostmortemTemplateUserRelationship",
5792+
"v2.postmortem_template_user_relationship_data" => "PostmortemTemplateUserRelationshipData",
57845793
"v2.powerpack" => "Powerpack",
57855794
"v2.powerpack_attributes" => "PowerpackAttributes",
57865795
"v2.powerpack_data" => "PowerpackData",

lib/datadog_api_client/v2/api/incidents_api.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ def delete_incident_postmortem_template(template_id, opts = {})
15191519
#
15201520
# Delete a postmortem template.
15211521
#
1522-
# @param template_id [String] The ID of the postmortem template
1522+
# @param template_id [String] The ID of the postmortem template.
15231523
# @param opts [Hash] the optional parameters
15241524
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
15251525
def delete_incident_postmortem_template_with_http_info(template_id, opts = {})
@@ -2240,7 +2240,7 @@ def get_incident_postmortem_template(template_id, opts = {})
22402240
#
22412241
# Retrieve details of a specific postmortem template.
22422242
#
2243-
# @param template_id [String] The ID of the postmortem template
2243+
# @param template_id [String] The ID of the postmortem template.
22442244
# @param opts [Hash] the optional parameters
22452245
# @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers
22462246
def get_incident_postmortem_template_with_http_info(template_id, opts = {})
@@ -3101,6 +3101,8 @@ def list_incident_postmortem_templates(opts = {})
31013101
# Retrieve a list of all postmortem templates for incidents.
31023102
#
31033103
# @param opts [Hash] the optional parameters
3104+
# @option opts [UUID] :filter_incident_type Filter postmortem templates by the associated incident type ID.
3105+
# @option opts [String] :sort The attribute to sort results by. Prefix with `-` for descending order.
31043106
# @return [Array<(PostmortemTemplatesResponse, Integer, Hash)>] PostmortemTemplatesResponse data, response status code and response headers
31053107
def list_incident_postmortem_templates_with_http_info(opts = {})
31063108
unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_postmortem_templates".to_sym]
@@ -3118,6 +3120,8 @@ def list_incident_postmortem_templates_with_http_info(opts = {})
31183120

31193121
# query parameters
31203122
query_params = opts[:query_params] || {}
3123+
query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil?
3124+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
31213125

31223126
# header parameters
31233127
header_params = opts[:header_params] || {}
@@ -4215,7 +4219,7 @@ def update_incident_postmortem_template(template_id, body, opts = {})
42154219
#
42164220
# Update an existing postmortem template.
42174221
#
4218-
# @param template_id [String] The ID of the postmortem template
4222+
# @param template_id [String] The ID of the postmortem template.
42194223
# @param body [PostmortemTemplateRequest]
42204224
# @param opts [Hash] the optional parameters
42214225
# @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers

0 commit comments

Comments
 (0)