Skip to content

Commit 1ece313

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Update On-Call Escalation policies endpoints schemas and description (#2353)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 431dfdc commit 1ece313

File tree

9 files changed

+44
-31
lines changed

9 files changed

+44
-31
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-24 04:43:27.330024",
8-
"spec_repo_commit": "ab6a0f8c"
7+
"regenerated": "2025-04-24 13:38:29.822501",
8+
"spec_repo_commit": "4295fd1a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-24 04:43:27.348734",
13-
"spec_repo_commit": "ab6a0f8c"
12+
"regenerated": "2025-04-24 13:38:29.838645",
13+
"spec_repo_commit": "4295fd1a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -13065,6 +13065,7 @@ components:
1306513065
$ref: '#/components/schemas/EscalationPolicyDataAttributes'
1306613066
id:
1306713067
description: Specifies the unique identifier of the escalation policy.
13068+
example: ab000000-0000-0000-0000-000000000000
1306813069
type: string
1306913070
relationships:
1307013071
$ref: '#/components/schemas/EscalationPolicyDataRelationships'
@@ -28006,6 +28007,7 @@ components:
2800628007
$ref: '#/components/schemas/ScheduleCreateRequestDataType'
2800728008
required:
2800828009
- type
28010+
- attributes
2800928011
type: object
2801028012
ScheduleCreateRequestDataAttributes:
2801128013
description: Describes the main attributes for creating a new schedule, including
@@ -47481,7 +47483,7 @@ paths:
4748147483
- apiKeyAuth: []
4748247484
appKeyAuth: []
4748347485
- AuthZ: []
47484-
summary: Create on call escalation policy
47486+
summary: Create on-call escalation policy
4748547487
tags:
4748647488
- On-Call
4748747489
/api/v2/on-call/escalation-policies/{policy_id}:
@@ -47511,7 +47513,7 @@ paths:
4751147513
- apiKeyAuth: []
4751247514
appKeyAuth: []
4751347515
- AuthZ: []
47514-
summary: Delete on call escalation policy
47516+
summary: Delete on-call escalation policy
4751547517
tags:
4751647518
- On-Call
4751747519
get:
@@ -47552,7 +47554,7 @@ paths:
4755247554
- apiKeyAuth: []
4755347555
appKeyAuth: []
4755447556
- AuthZ: []
47555-
summary: Get on call escalation policy
47557+
summary: Get on-call escalation policy
4755647558
tags:
4755747559
- On-Call
4755847560
put:
@@ -47599,7 +47601,7 @@ paths:
4759947601
- apiKeyAuth: []
4760047602
appKeyAuth: []
4760147603
- AuthZ: []
47602-
summary: Update on call escalation policy
47604+
summary: Update on-call escalation policy
4760347605
tags:
4760447606
- On-Call
4760547607
/api/v2/on-call/schedules:

examples/v2/on-call/CreateOnCallEscalationPolicy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Create on call escalation policy returns "Created" response
1+
# Create on-call escalation policy returns "Created" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::On - CallAPI.new

examples/v2/on-call/DeleteOnCallEscalationPolicy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Delete on call escalation policy returns "No Content" response
1+
# Delete on-call escalation policy returns "No Content" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::On - CallAPI.new

examples/v2/on-call/GetOnCallEscalationPolicy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Get on call escalation policy returns "OK" response
1+
# Get on-call escalation policy returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::On - CallAPI.new

examples/v2/on-call/UpdateOnCallEscalationPolicy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Update on call escalation policy returns "OK" response
1+
# Update on-call escalation policy returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::On - CallAPI.new

features/v2/on-call.feature

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: On-Call
1010
And an instance of "On-Call" API
1111

1212
@generated @skip @team:DataDog/bugle
13-
Scenario: Create on call escalation policy returns "Bad Request" response
13+
Scenario: Create on-call escalation policy returns "Bad Request" response
1414
Given new "CreateOnCallEscalationPolicy" request
1515
And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "name": "Escalation Policy 1", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}, {"id": "00000000-aba3-0000-0000-000000000000", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-abb1-0000-0000-000000000000", "type": "users"}]}]}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@team:DataDog/bugle
20-
Scenario: Create on call escalation policy returns "Created" response
20+
Scenario: Create on-call escalation policy returns "Created" response
2121
Given new "CreateOnCallEscalationPolicy" request
2222
And there is a valid "schedule" in the system
2323
And there is a valid "dd_team" in the system
@@ -43,7 +43,7 @@ Feature: On-Call
4343
Then the response status is 201 Created
4444

4545
@team:DataDog/bugle
46-
Scenario: Delete on call escalation policy returns "No Content" response
46+
Scenario: Delete on-call escalation policy returns "No Content" response
4747
Given new "DeleteOnCallEscalationPolicy" request
4848
And there is a valid "user" in the system
4949
And there is a valid "dd_team" in the system
@@ -54,7 +54,7 @@ Feature: On-Call
5454
Then the response status is 204 No Content
5555

5656
@generated @skip @team:DataDog/bugle
57-
Scenario: Delete on call escalation policy returns "Not Found" response
57+
Scenario: Delete on-call escalation policy returns "Not Found" response
5858
Given new "DeleteOnCallEscalationPolicy" request
5959
And request contains "policy_id" parameter from "REPLACE.ME"
6060
When the request is sent
@@ -76,21 +76,21 @@ Feature: On-Call
7676
Then the response status is 404 Not Found
7777

7878
@generated @skip @team:DataDog/bugle
79-
Scenario: Get on call escalation policy returns "Bad Request" response
79+
Scenario: Get on-call escalation policy returns "Bad Request" response
8080
Given new "GetOnCallEscalationPolicy" request
8181
And request contains "policy_id" parameter from "REPLACE.ME"
8282
When the request is sent
8383
Then the response status is 400 Bad Request
8484

8585
@generated @skip @team:DataDog/bugle
86-
Scenario: Get on call escalation policy returns "Not Found" response
86+
Scenario: Get on-call escalation policy returns "Not Found" response
8787
Given new "GetOnCallEscalationPolicy" request
8888
And request contains "policy_id" parameter from "REPLACE.ME"
8989
When the request is sent
9090
Then the response status is 404 Not Found
9191

9292
@team:DataDog/bugle
93-
Scenario: Get on call escalation policy returns "OK" response
93+
Scenario: Get on-call escalation policy returns "OK" response
9494
Given new "GetOnCallEscalationPolicy" request
9595
And there is a valid "user" in the system
9696
And there is a valid "dd_team" in the system
@@ -116,23 +116,23 @@ Feature: On-Call
116116
Then the response status is 200 OK
117117

118118
@generated @skip @team:DataDog/bugle
119-
Scenario: Update on call escalation policy returns "Bad Request" response
119+
Scenario: Update on-call escalation policy returns "Bad Request" response
120120
Given new "UpdateOnCallEscalationPolicy" request
121121
And request contains "policy_id" parameter from "REPLACE.ME"
122122
And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "name": "Escalation Policy 1", "resolve_page_on_policy_end": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}}
123123
When the request is sent
124124
Then the response status is 400 Bad Request
125125

126126
@generated @skip @team:DataDog/bugle
127-
Scenario: Update on call escalation policy returns "Not Found" response
127+
Scenario: Update on-call escalation policy returns "Not Found" response
128128
Given new "UpdateOnCallEscalationPolicy" request
129129
And request contains "policy_id" parameter from "REPLACE.ME"
130130
And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "name": "Escalation Policy 1", "resolve_page_on_policy_end": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}}
131131
When the request is sent
132132
Then the response status is 404 Not Found
133133

134134
@team:DataDog/bugle
135-
Scenario: Update on call escalation policy returns "OK" response
135+
Scenario: Update on-call escalation policy returns "OK" response
136136
Given new "UpdateOnCallEscalationPolicy" request
137137
And there is a valid "user" in the system
138138
And there is a valid "dd_team" in the system

lib/datadog_api_client/v2/api/on_call_api.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
2323
@api_client = api_client
2424
end
2525

26-
# Create on call escalation policy.
26+
# Create on-call escalation policy.
2727
#
2828
# @see #create_on_call_escalation_policy_with_http_info
2929
def create_on_call_escalation_policy(body, opts = {})
3030
data, _status_code, _headers = create_on_call_escalation_policy_with_http_info(body, opts)
3131
data
3232
end
3333

34-
# Create on call escalation policy.
34+
# Create on-call escalation policy.
3535
#
3636
# Create a new on-call escalation policy
3737
#
@@ -161,15 +161,15 @@ def create_on_call_schedule_with_http_info(body, opts = {})
161161
return data, status_code, headers
162162
end
163163

164-
# Delete on call escalation policy.
164+
# Delete on-call escalation policy.
165165
#
166166
# @see #delete_on_call_escalation_policy_with_http_info
167167
def delete_on_call_escalation_policy(policy_id, opts = {})
168168
delete_on_call_escalation_policy_with_http_info(policy_id, opts)
169169
nil
170170
end
171171

172-
# Delete on call escalation policy.
172+
# Delete on-call escalation policy.
173173
#
174174
# Delete an on-call escalation policy
175175
#
@@ -291,15 +291,15 @@ def delete_on_call_schedule_with_http_info(schedule_id, opts = {})
291291
return data, status_code, headers
292292
end
293293

294-
# Get on call escalation policy.
294+
# Get on-call escalation policy.
295295
#
296296
# @see #get_on_call_escalation_policy_with_http_info
297297
def get_on_call_escalation_policy(policy_id, opts = {})
298298
data, _status_code, _headers = get_on_call_escalation_policy_with_http_info(policy_id, opts)
299299
data
300300
end
301301

302-
# Get on call escalation policy.
302+
# Get on-call escalation policy.
303303
#
304304
# Get an on-call escalation policy
305305
#
@@ -425,15 +425,15 @@ def get_on_call_schedule_with_http_info(schedule_id, opts = {})
425425
return data, status_code, headers
426426
end
427427

428-
# Update on call escalation policy.
428+
# Update on-call escalation policy.
429429
#
430430
# @see #update_on_call_escalation_policy_with_http_info
431431
def update_on_call_escalation_policy(policy_id, body, opts = {})
432432
data, _status_code, _headers = update_on_call_escalation_policy_with_http_info(policy_id, body, opts)
433433
data
434434
end
435435

436-
# Update on call escalation policy.
436+
# Update on-call escalation policy.
437437
#
438438
# Update an on-call escalation policy
439439
#

lib/datadog_api_client/v2/models/schedule_create_request_data.rb

+12-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ScheduleCreateRequestData
2222
include BaseGenericModel
2323

2424
# Describes the main attributes for creating a new schedule, including name, layers, time zone, and tags.
25-
attr_accessor :attributes
25+
attr_reader :attributes
2626

2727
# Gathers relationship objects for the schedule creation request, including the teams to associate.
2828
attr_accessor :relationships
@@ -87,10 +87,21 @@ def initialize(attributes = {})
8787
# @return true if the model is valid
8888
# @!visibility private
8989
def valid?
90+
return false if @attributes.nil?
9091
return false if @type.nil?
9192
true
9293
end
9394

95+
# Custom attribute writer method with validation
96+
# @param attributes [Object] Object to be assigned
97+
# @!visibility private
98+
def attributes=(attributes)
99+
if attributes.nil?
100+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
101+
end
102+
@attributes = attributes
103+
end
104+
94105
# Custom attribute writer method with validation
95106
# @param type [Object] Object to be assigned
96107
# @!visibility private

0 commit comments

Comments
 (0)