From 9fffef1cd18928df19ac6c51f96afc3d8fa20a46 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Feb 2026 11:53:00 +0000 Subject: [PATCH] Regenerate client from commit 8dff748 of spec repo --- .generator/schemas/v2/openapi.yaml | 8 ++++ examples/v2/apm/GetServiceList.java | 2 +- .../com/datadog/api/client/v2/api/ApmApi.java | 47 +++++++++++++++---- .../com/datadog/api/client/v2/api/apm.feature | 1 + 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 07cf64fab0e..6606535523d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -71059,6 +71059,14 @@ paths: /api/v2/apm/services: get: operationId: GetServiceList + parameters: + - description: Filter services by environment. Can be set to `*` to return all + services across all environments. + in: query + name: filter[env] + required: true + schema: + type: string responses: '200': content: diff --git a/examples/v2/apm/GetServiceList.java b/examples/v2/apm/GetServiceList.java index 025dbd99022..3dc8dc5fad3 100644 --- a/examples/v2/apm/GetServiceList.java +++ b/examples/v2/apm/GetServiceList.java @@ -11,7 +11,7 @@ public static void main(String[] args) { ApmApi apiInstance = new ApmApi(defaultClient); try { - ServiceList result = apiInstance.getServiceList(); + ServiceList result = apiInstance.getServiceList("filter[env]"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApmApi#getServiceList"); diff --git a/src/main/java/com/datadog/api/client/v2/api/ApmApi.java b/src/main/java/com/datadog/api/client/v2/api/ApmApi.java index 02920f126f7..852a7f1bc0c 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ApmApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ApmApi.java @@ -9,6 +9,7 @@ import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -48,11 +49,13 @@ public void setApiClient(ApiClient apiClient) { * *

See {@link #getServiceListWithHttpInfo}. * + * @param filterEnv Filter services by environment. Can be set to * to return all + * services across all environments. (required) * @return ServiceList * @throws ApiException if fails to make API call */ - public ServiceList getServiceList() throws ApiException { - return getServiceListWithHttpInfo().getData(); + public ServiceList getServiceList(String filterEnv) throws ApiException { + return getServiceListWithHttpInfo(filterEnv).getData(); } /** @@ -60,10 +63,12 @@ public ServiceList getServiceList() throws ApiException { * *

See {@link #getServiceListWithHttpInfoAsync}. * + * @param filterEnv Filter services by environment. Can be set to * to return all + * services across all environments. (required) * @return CompletableFuture<ServiceList> */ - public CompletableFuture getServiceListAsync() { - return getServiceListWithHttpInfoAsync() + public CompletableFuture getServiceListAsync(String filterEnv) { + return getServiceListWithHttpInfoAsync(filterEnv) .thenApply( response -> { return response.getData(); @@ -71,6 +76,8 @@ public CompletableFuture getServiceListAsync() { } /** + * @param filterEnv Filter services by environment. Can be set to * to return all + * services across all environments. (required) * @return ApiResponse<ServiceList> * @throws ApiException if fails to make API call * @http.response.details @@ -81,18 +88,27 @@ public CompletableFuture getServiceListAsync() { * 429 Too many requests - * */ - public ApiResponse getServiceListWithHttpInfo() throws ApiException { + public ApiResponse getServiceListWithHttpInfo(String filterEnv) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'filterEnv' is set + if (filterEnv == null) { + throw new ApiException( + 400, "Missing the required parameter 'filterEnv' when calling getServiceList"); + } // create path and map variables String localVarPath = "/api/v2/apm/services"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[env]", filterEnv)); + Invocation.Builder builder = apiClient.createBuilder( "v2.ApmApi.getServiceList", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -113,22 +129,37 @@ public ApiResponse getServiceListWithHttpInfo() throws ApiException * *

See {@link #getServiceListWithHttpInfo}. * + * @param filterEnv Filter services by environment. Can be set to * to return all + * services across all environments. (required) * @return CompletableFuture<ApiResponse<ServiceList>> */ - public CompletableFuture> getServiceListWithHttpInfoAsync() { + public CompletableFuture> getServiceListWithHttpInfoAsync( + String filterEnv) { Object localVarPostBody = null; + + // verify the required parameter 'filterEnv' is set + if (filterEnv == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'filterEnv' when calling getServiceList")); + return result; + } // create path and map variables String localVarPath = "/api/v2/apm/services"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[env]", filterEnv)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.ApmApi.getServiceList", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, diff --git a/src/test/resources/com/datadog/api/client/v2/api/apm.feature b/src/test/resources/com/datadog/api/client/v2/api/apm.feature index e35bd4d4750..c286ba4f8ba 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/apm.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/apm.feature @@ -9,5 +9,6 @@ Feature: APM And a valid "appKeyAuth" key in the system And an instance of "APM" API And new "GetServiceList" request + And request contains "filter[env]" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK