Skip to content

Commit 8e52e67

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8a099df of spec repo
1 parent 1920b15 commit 8e52e67

File tree

5 files changed

+57
-18
lines changed

5 files changed

+57
-18
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72918,9 +72918,13 @@ paths:
7291872918
- apiKeyAuth: []
7291972919
appKeyAuth: []
7292072920
- AuthZ: []
72921-
summary: Get the schedule on-call user
72921+
summary: Get the scheduled on-call user
7292272922
tags:
7292372923
- On-Call
72924+
x-permission:
72925+
operator: AND
72926+
permissions:
72927+
- on_call_write
7292472928
/api/v2/on-call/teams/{team_id}/on-call:
7292572929
get:
7292672930
description: Get a team's on-call users at a given time
@@ -72963,6 +72967,10 @@ paths:
7296372967
summary: Get team on-call users
7296472968
tags:
7296572969
- On-Call
72970+
x-permission:
72971+
operator: AND
72972+
permissions:
72973+
- on_call_write
7296672974
/api/v2/on-call/teams/{team_id}/routing-rules:
7296772975
get:
7296872976
description: Get a team's On-Call routing rules

examples/v2/on-call/GetScheduleOnCallUser.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Get the schedule on-call user returns "OK" response
1+
// Get the scheduled on-call user returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -10,11 +10,8 @@ public static void main(String[] args) {
1010
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1111
OnCallApi apiInstance = new OnCallApi(defaultClient);
1212

13-
// there is a valid "schedule" in the system
14-
String SCHEDULE_DATA_ID = System.getenv("SCHEDULE_DATA_ID");
15-
1613
try {
17-
Shift result = apiInstance.getScheduleOnCallUser(SCHEDULE_DATA_ID);
14+
Shift result = apiInstance.getScheduleOnCallUser("3653d3c6-0c75-11ea-ad28-fb5701eabc7d");
1815
System.out.println(result);
1916
} catch (ApiException e) {
2017
System.err.println("Exception when calling OnCallApi#getScheduleOnCallUser");
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Get the schedule on-call user returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.OnCallApi;
6+
import com.datadog.api.client.v2.model.Shift;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
OnCallApi apiInstance = new OnCallApi(defaultClient);
12+
13+
// there is a valid "schedule" in the system
14+
String SCHEDULE_DATA_ID = System.getenv("SCHEDULE_DATA_ID");
15+
16+
try {
17+
Shift result = apiInstance.getScheduleOnCallUser(SCHEDULE_DATA_ID);
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println("Exception when calling OnCallApi#getScheduleOnCallUser");
21+
System.err.println("Status code: " + e.getCode());
22+
System.err.println("Reason: " + e.getResponseBody());
23+
System.err.println("Response headers: " + e.getResponseHeaders());
24+
e.printStackTrace();
25+
}
26+
}
27+
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ public GetScheduleOnCallUserOptionalParameters filterAtTs(String filterAtTs) {
13581358
}
13591359

13601360
/**
1361-
* Get the schedule on-call user.
1361+
* Get the scheduled on-call user.
13621362
*
13631363
* <p>See {@link #getScheduleOnCallUserWithHttpInfo}.
13641364
*
@@ -1373,7 +1373,7 @@ scheduleId, new GetScheduleOnCallUserOptionalParameters())
13731373
}
13741374

13751375
/**
1376-
* Get the schedule on-call user.
1376+
* Get the scheduled on-call user.
13771377
*
13781378
* <p>See {@link #getScheduleOnCallUserWithHttpInfoAsync}.
13791379
*
@@ -1390,7 +1390,7 @@ scheduleId, new GetScheduleOnCallUserOptionalParameters())
13901390
}
13911391

13921392
/**
1393-
* Get the schedule on-call user.
1393+
* Get the scheduled on-call user.
13941394
*
13951395
* <p>See {@link #getScheduleOnCallUserWithHttpInfo}.
13961396
*
@@ -1405,7 +1405,7 @@ public Shift getScheduleOnCallUser(
14051405
}
14061406

14071407
/**
1408-
* Get the schedule on-call user.
1408+
* Get the scheduled on-call user.
14091409
*
14101410
* <p>See {@link #getScheduleOnCallUserWithHttpInfoAsync}.
14111411
*
@@ -1485,7 +1485,7 @@ public ApiResponse<Shift> getScheduleOnCallUserWithHttpInfo(
14851485
}
14861486

14871487
/**
1488-
* Get the schedule on-call user.
1488+
* Get the scheduled on-call user.
14891489
*
14901490
* <p>See {@link #getScheduleOnCallUserWithHttpInfo}.
14911491
*

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,33 @@ Feature: On-Call
153153
When the request is sent
154154
Then the response status is 200 OK
155155

156+
@team:DataDog/on-call
157+
Scenario: Get the schedule on-call user returns "OK" response
158+
Given new "GetScheduleOnCallUser" request
159+
And there is a valid "user" in the system
160+
And there is a valid "schedule" in the system
161+
And request contains "schedule_id" parameter from "schedule.data.id"
162+
When the request is sent
163+
Then the response status is 200 OK
164+
156165
@generated @skip @team:DataDog/on-call
157-
Scenario: Get the schedule on-call user returns "Bad Request" response
166+
Scenario: Get the scheduled on-call user returns "Bad Request" response
158167
Given new "GetScheduleOnCallUser" request
159168
And request contains "schedule_id" parameter from "REPLACE.ME"
160169
When the request is sent
161170
Then the response status is 400 Bad Request
162171

163172
@generated @skip @team:DataDog/on-call
164-
Scenario: Get the schedule on-call user returns "Not Found" response
173+
Scenario: Get the scheduled on-call user returns "Not Found" response
165174
Given new "GetScheduleOnCallUser" request
166175
And request contains "schedule_id" parameter from "REPLACE.ME"
167176
When the request is sent
168177
Then the response status is 404 Not Found
169178

170-
@team:DataDog/on-call
171-
Scenario: Get the schedule on-call user returns "OK" response
179+
@generated @skip @team:DataDog/on-call
180+
Scenario: Get the scheduled on-call user returns "OK" response
172181
Given new "GetScheduleOnCallUser" request
173-
And there is a valid "user" in the system
174-
And there is a valid "schedule" in the system
175-
And request contains "schedule_id" parameter from "schedule.data.id"
182+
And request contains "schedule_id" parameter from "REPLACE.ME"
176183
When the request is sent
177184
Then the response status is 200 OK
178185

0 commit comments

Comments
 (0)