From ac5857513b3bb6405ec0f04099b0f0f9434bc8e2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 25 Nov 2025 17:46:42 +0000 Subject: [PATCH] Regenerate client from commit 479ca66 of spec repo --- .generator/schemas/v2/openapi.yaml | 10 ++++++- .../v2/on-call/GetScheduleOnCallUser.java | 7 ++--- .../GetScheduleOnCallUser_3672445524.java | 27 +++++++++++++++++++ .../datadog/api/client/v2/api/OnCallApi.java | 10 +++---- .../datadog/api/client/v2/api/on-call.feature | 21 ++++++++++----- 5 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 examples/v2/on-call/GetScheduleOnCallUser_3672445524.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb715496..32b9503e620 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -72918,9 +72918,13 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get the schedule on-call user + summary: Get the scheduled on-call user tags: - On-Call + x-permission: + operator: AND + permissions: + - on_call_read /api/v2/on-call/teams/{team_id}/on-call: get: description: Get a team's on-call users at a given time @@ -72963,6 +72967,10 @@ paths: summary: Get team on-call users tags: - On-Call + x-permission: + operator: AND + permissions: + - on_call_read /api/v2/on-call/teams/{team_id}/routing-rules: get: description: Get a team's On-Call routing rules diff --git a/examples/v2/on-call/GetScheduleOnCallUser.java b/examples/v2/on-call/GetScheduleOnCallUser.java index a75e3e8b896..0074020edb1 100644 --- a/examples/v2/on-call/GetScheduleOnCallUser.java +++ b/examples/v2/on-call/GetScheduleOnCallUser.java @@ -1,4 +1,4 @@ -// Get the schedule on-call user returns "OK" response +// Get the scheduled on-call user returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -10,11 +10,8 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); OnCallApi apiInstance = new OnCallApi(defaultClient); - // there is a valid "schedule" in the system - String SCHEDULE_DATA_ID = System.getenv("SCHEDULE_DATA_ID"); - try { - Shift result = apiInstance.getScheduleOnCallUser(SCHEDULE_DATA_ID); + Shift result = apiInstance.getScheduleOnCallUser("3653d3c6-0c75-11ea-ad28-fb5701eabc7d"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OnCallApi#getScheduleOnCallUser"); diff --git a/examples/v2/on-call/GetScheduleOnCallUser_3672445524.java b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.java new file mode 100644 index 00000000000..a75e3e8b896 --- /dev/null +++ b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.java @@ -0,0 +1,27 @@ +// Get the schedule on-call user returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OnCallApi; +import com.datadog.api.client.v2.model.Shift; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OnCallApi apiInstance = new OnCallApi(defaultClient); + + // there is a valid "schedule" in the system + String SCHEDULE_DATA_ID = System.getenv("SCHEDULE_DATA_ID"); + + try { + Shift result = apiInstance.getScheduleOnCallUser(SCHEDULE_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OnCallApi#getScheduleOnCallUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java b/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java index 40fd0e1e51d..07d7fb9d8c8 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java @@ -1358,7 +1358,7 @@ public GetScheduleOnCallUserOptionalParameters filterAtTs(String filterAtTs) { } /** - * Get the schedule on-call user. + * Get the scheduled on-call user. * *

See {@link #getScheduleOnCallUserWithHttpInfo}. * @@ -1373,7 +1373,7 @@ scheduleId, new GetScheduleOnCallUserOptionalParameters()) } /** - * Get the schedule on-call user. + * Get the scheduled on-call user. * *

See {@link #getScheduleOnCallUserWithHttpInfoAsync}. * @@ -1390,7 +1390,7 @@ scheduleId, new GetScheduleOnCallUserOptionalParameters()) } /** - * Get the schedule on-call user. + * Get the scheduled on-call user. * *

See {@link #getScheduleOnCallUserWithHttpInfo}. * @@ -1405,7 +1405,7 @@ public Shift getScheduleOnCallUser( } /** - * Get the schedule on-call user. + * Get the scheduled on-call user. * *

See {@link #getScheduleOnCallUserWithHttpInfoAsync}. * @@ -1485,7 +1485,7 @@ public ApiResponse getScheduleOnCallUserWithHttpInfo( } /** - * Get the schedule on-call user. + * Get the scheduled on-call user. * *

See {@link #getScheduleOnCallUserWithHttpInfo}. * diff --git a/src/test/resources/com/datadog/api/client/v2/api/on-call.feature b/src/test/resources/com/datadog/api/client/v2/api/on-call.feature index 39640938e4a..251f00fae40 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/on-call.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/on-call.feature @@ -153,26 +153,33 @@ Feature: On-Call When the request is sent Then the response status is 200 OK + @team:DataDog/on-call + Scenario: Get the schedule on-call user returns "OK" response + Given new "GetScheduleOnCallUser" request + And there is a valid "user" in the system + And there is a valid "schedule" in the system + And request contains "schedule_id" parameter from "schedule.data.id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "Bad Request" response + Scenario: Get the scheduled on-call user returns "Bad Request" response Given new "GetScheduleOnCallUser" request And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "Not Found" response + Scenario: Get the scheduled on-call user returns "Not Found" response Given new "GetScheduleOnCallUser" request And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "OK" response + @generated @skip @team:DataDog/on-call + Scenario: Get the scheduled on-call user returns "OK" response Given new "GetScheduleOnCallUser" request - And there is a valid "user" in the system - And there is a valid "schedule" in the system - And request contains "schedule_id" parameter from "schedule.data.id" + And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK