Skip to content

Commit fde2125

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update On-Call Escalation policies endpoints schemas and description (#2820)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b4f38c2 commit fde2125

File tree

9 files changed

+47
-42
lines changed

9 files changed

+47
-42
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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:26.519023",
8-
"spec_repo_commit": "ab6a0f8c"
7+
"regenerated": "2025-04-24 13:38:30.436819",
8+
"spec_repo_commit": "4295fd1a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-24 04:43:26.538587",
13-
"spec_repo_commit": "ab6a0f8c"
12+
"regenerated": "2025-04-24 13:38:30.454324",
13+
"spec_repo_commit": "4295fd1a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 4 deletions
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.java

Lines changed: 1 addition & 1 deletion
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
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;

examples/v2/on-call/DeleteOnCallEscalationPolicy.java

Lines changed: 1 addition & 1 deletion
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
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;

examples/v2/on-call/GetOnCallEscalationPolicy.java

Lines changed: 1 addition & 1 deletion
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
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;

examples/v2/on-call/UpdateOnCallEscalationPolicy.java

Lines changed: 1 addition & 1 deletion
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
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;

src/main/java/com/datadog/api/client/v2/api/OnCallApi.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public CreateOnCallEscalationPolicyOptionalParameters include(String include) {
6767
}
6868

6969
/**
70-
* Create on call escalation policy.
70+
* Create on-call escalation policy.
7171
*
7272
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
7373
*
@@ -83,7 +83,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters())
8383
}
8484

8585
/**
86-
* Create on call escalation policy.
86+
* Create on-call escalation policy.
8787
*
8888
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}.
8989
*
@@ -101,7 +101,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters())
101101
}
102102

103103
/**
104-
* Create on call escalation policy.
104+
* Create on-call escalation policy.
105105
*
106106
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
107107
*
@@ -117,7 +117,7 @@ public EscalationPolicy createOnCallEscalationPolicy(
117117
}
118118

119119
/**
120-
* Create on call escalation policy.
120+
* Create on-call escalation policy.
121121
*
122122
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}.
123123
*
@@ -193,7 +193,7 @@ public ApiResponse<EscalationPolicy> createOnCallEscalationPolicyWithHttpInfo(
193193
}
194194

195195
/**
196-
* Create on call escalation policy.
196+
* Create on-call escalation policy.
197197
*
198198
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
199199
*
@@ -449,7 +449,7 @@ public CompletableFuture<ApiResponse<Schedule>> createOnCallScheduleWithHttpInfo
449449
}
450450

451451
/**
452-
* Delete on call escalation policy.
452+
* Delete on-call escalation policy.
453453
*
454454
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfo}.
455455
*
@@ -461,7 +461,7 @@ public void deleteOnCallEscalationPolicy(String policyId) throws ApiException {
461461
}
462462

463463
/**
464-
* Delete on call escalation policy.
464+
* Delete on-call escalation policy.
465465
*
466466
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfoAsync}.
467467
*
@@ -531,7 +531,7 @@ public ApiResponse<Void> deleteOnCallEscalationPolicyWithHttpInfo(String policyI
531531
}
532532

533533
/**
534-
* Delete on call escalation policy.
534+
* Delete on-call escalation policy.
535535
*
536536
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfo}.
537537
*
@@ -741,7 +741,7 @@ public GetOnCallEscalationPolicyOptionalParameters include(String include) {
741741
}
742742

743743
/**
744-
* Get on call escalation policy.
744+
* Get on-call escalation policy.
745745
*
746746
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
747747
*
@@ -756,7 +756,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters())
756756
}
757757

758758
/**
759-
* Get on call escalation policy.
759+
* Get on-call escalation policy.
760760
*
761761
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}.
762762
*
@@ -773,7 +773,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters())
773773
}
774774

775775
/**
776-
* Get on call escalation policy.
776+
* Get on-call escalation policy.
777777
*
778778
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
779779
*
@@ -788,7 +788,7 @@ public EscalationPolicy getOnCallEscalationPolicy(
788788
}
789789

790790
/**
791-
* Get on call escalation policy.
791+
* Get on-call escalation policy.
792792
*
793793
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}.
794794
*
@@ -865,7 +865,7 @@ public ApiResponse<EscalationPolicy> getOnCallEscalationPolicyWithHttpInfo(
865865
}
866866

867867
/**
868-
* Get on call escalation policy.
868+
* Get on-call escalation policy.
869869
*
870870
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
871871
*
@@ -1143,7 +1143,7 @@ public UpdateOnCallEscalationPolicyOptionalParameters include(String include) {
11431143
}
11441144

11451145
/**
1146-
* Update on call escalation policy.
1146+
* Update on-call escalation policy.
11471147
*
11481148
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
11491149
*
@@ -1160,7 +1160,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters())
11601160
}
11611161

11621162
/**
1163-
* Update on call escalation policy.
1163+
* Update on-call escalation policy.
11641164
*
11651165
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}.
11661166
*
@@ -1179,7 +1179,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters())
11791179
}
11801180

11811181
/**
1182-
* Update on call escalation policy.
1182+
* Update on-call escalation policy.
11831183
*
11841184
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
11851185
*
@@ -1198,7 +1198,7 @@ public EscalationPolicy updateOnCallEscalationPolicy(
11981198
}
11991199

12001200
/**
1201-
* Update on call escalation policy.
1201+
* Update on-call escalation policy.
12021202
*
12031203
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}.
12041204
*
@@ -1289,7 +1289,7 @@ public ApiResponse<EscalationPolicy> updateOnCallEscalationPolicyWithHttpInfo(
12891289
}
12901290

12911291
/**
1292-
* Update on call escalation policy.
1292+
* Update on-call escalation policy.
12931293
*
12941294
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
12951295
*

src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestData.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ public ScheduleCreateRequestData() {}
4343

4444
@JsonCreator
4545
public ScheduleCreateRequestData(
46+
@JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
47+
ScheduleCreateRequestDataAttributes attributes,
4648
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
4749
ScheduleCreateRequestDataType type) {
50+
this.attributes = attributes;
51+
this.unparsed |= attributes.unparsed;
4852
this.type = type;
4953
this.unparsed |= !type.isValid();
5054
}
@@ -61,9 +65,8 @@ public ScheduleCreateRequestData attributes(ScheduleCreateRequestDataAttributes
6165
*
6266
* @return attributes
6367
*/
64-
@jakarta.annotation.Nullable
6568
@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
66-
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
6770
public ScheduleCreateRequestDataAttributes getAttributes() {
6871
return attributes;
6972
}

src/test/resources/com/datadog/api/client/v2/api/on-call.feature

Lines changed: 10 additions & 10 deletions
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

0 commit comments

Comments
 (0)