Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
645 changes: 338 additions & 307 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 22 additions & 0 deletions examples/v2/incidents/CreateIncidentAttachment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Create incident attachment returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_incident_attachment".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::CreateAttachmentRequest.new({
data: DatadogAPIClient::V2::CreateAttachmentRequestData.new({
attributes: DatadogAPIClient::V2::CreateAttachmentRequestDataAttributes.new({
attachment: DatadogAPIClient::V2::CreateAttachmentRequestDataAttributesAttachment.new({
document_url: "https://app.datadoghq.com/notebook/123/Postmortem-IR-123",
title: "Postmortem-IR-123",
}),
attachment_type: DatadogAPIClient::V2::AttachmentDataAttributesAttachmentType::POSTMORTEM,
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::IncidentAttachmentType::INCIDENT_ATTACHMENTS,
}),
})
p api_instance.create_incident_attachment("incident_id", body)
8 changes: 8 additions & 0 deletions examples/v2/incidents/DeleteIncidentAttachment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete incident attachment returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_incident_attachment".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
api_instance.delete_incident_attachment("incident_id", "00000000-0000-0000-0000-000000000002")
2 changes: 1 addition & 1 deletion examples/v2/incidents/ListIncidentAttachments.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get a list of attachments returns "OK" response
# List incident attachments returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
Expand Down
11 changes: 0 additions & 11 deletions examples/v2/incidents/ListIncidentAttachments_2457735435.rb

This file was deleted.

20 changes: 20 additions & 0 deletions examples/v2/incidents/UpdateIncidentAttachment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Update incident attachment returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_incident_attachment".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::PatchAttachmentRequest.new({
data: DatadogAPIClient::V2::PatchAttachmentRequestData.new({
attributes: DatadogAPIClient::V2::PatchAttachmentRequestDataAttributes.new({
attachment: DatadogAPIClient::V2::PatchAttachmentRequestDataAttributesAttachment.new({
document_url: "https://app.datadoghq.com/notebook/124/Postmortem-IR-124",
title: "Postmortem-IR-124",
}),
}),
type: DatadogAPIClient::V2::IncidentAttachmentType::INCIDENT_ATTACHMENTS,
}),
})
p api_instance.update_incident_attachment("incident_id", "00000000-0000-0000-0000-000000000002", body)
38 changes: 0 additions & 38 deletions examples/v2/incidents/UpdateIncidentAttachments.rb

This file was deleted.

26 changes: 0 additions & 26 deletions examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb

This file was deleted.

20 changes: 15 additions & 5 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2103,13 +2103,23 @@
},
"v2.ListIncidentAttachments" => {
"incident_id" => "String",
"include" => "Array<IncidentAttachmentRelatedObject>",
"filter_attachment_type" => "Array<IncidentAttachmentAttachmentType>",
"filter_attachment_type" => "String",
"include" => "String",
},
"v2.CreateIncidentAttachment" => {
"incident_id" => "String",
"include" => "String",
"body" => "CreateAttachmentRequest",
},
"v2.UpdateIncidentAttachments" => {
"v2.DeleteIncidentAttachment" => {
"incident_id" => "String",
"include" => "Array<IncidentAttachmentRelatedObject>",
"body" => "IncidentAttachmentUpdateRequest",
"attachment_id" => "Object",
},
"v2.UpdateIncidentAttachment" => {
"incident_id" => "String",
"attachment_id" => "Object",
"include" => "String",
"body" => "PatchAttachmentRequest",
},
"v2.ListIncidentImpacts" => {
"incident_id" => "String",
Expand Down
16 changes: 0 additions & 16 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,22 +447,6 @@
"tag": "Incidents",
"operationId": "CreateIncidentType"
},
{
"parameters": [
{
"name": "incident_id",
"source": "incident.data.id"
},
{
"name": "body",
"value": "{\n \"data\": [\n {\n \"attributes\": {\n \"attachment_type\": \"link\",\n \"attachment\": {\n \"documentUrl\": \"https://www.example.com/doc\",\n \"title\": \"Important Doc\"\n }\n },\n \"type\": \"incident_attachments\"\n }\n ]\n}"
}
],
"step": "the \"incident\" has an \"incident_attachment\"",
"key": "incident_attachment",
"tag": "Incidents",
"operationId": "UpdateIncidentAttachments"
},
{
"operationId": "CreateIncidentImpact",
"parameters": [
Expand Down
Loading
Loading