diff --git a/.apigentools-info b/.apigentools-info index 2b9aa2db7e9..5a9ae7a65ce 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-09-07 17:53:27.473235", - "spec_repo_commit": "40dbfff2" + "regenerated": "2023-09-12 16:35:51.258459", + "spec_repo_commit": "cbc99635" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-09-07 17:53:27.486739", - "spec_repo_commit": "40dbfff2" + "regenerated": "2023-09-12 16:35:51.271703", + "spec_repo_commit": "cbc99635" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8153c1b6aff..102fd41c850 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -18853,9 +18853,6 @@ paths: limitParam: page[limit] pageOffsetParam: page[offset] resultsPath: data - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Schedule a downtime. operationId: CreateDowntime @@ -18896,9 +18893,6 @@ paths: tags: - Downtimes x-codegen-request-body-name: body - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/downtime/{downtime_id}: delete: description: Cancel a downtime. @@ -18936,9 +18930,6 @@ paths: summary: Cancel a downtime tags: - Downtimes - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' get: description: Get downtime detail by `downtime_id`. operationId: GetDowntime @@ -18995,9 +18986,6 @@ paths: summary: Get a downtime tags: - Downtimes - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' patch: description: Update a downtime by `downtime_id`. operationId: UpdateDowntime @@ -19052,9 +19040,6 @@ paths: tags: - Downtimes x-codegen-request-body-name: body - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/events: get: description: 'List endpoint returns events that match an events search query. @@ -22619,9 +22604,6 @@ paths: tags: - Downtimes x-codegen-request-body-name: body - x-unstable: '**Note**: This endpoint is in private beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/permissions: get: description: Returns a list of all permissions, including name, description, diff --git a/examples/v2/downtimes/CancelDowntime.java b/examples/v2/downtimes/CancelDowntime.java index 5b05778b6e4..af8c261b66b 100644 --- a/examples/v2/downtimes/CancelDowntime.java +++ b/examples/v2/downtimes/CancelDowntime.java @@ -7,7 +7,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.cancelDowntime", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); // there is a valid "downtime_v2" in the system diff --git a/examples/v2/downtimes/CreateDowntime.java b/examples/v2/downtimes/CreateDowntime.java index 2b4cd1e8136..ee7b277c806 100644 --- a/examples/v2/downtimes/CreateDowntime.java +++ b/examples/v2/downtimes/CreateDowntime.java @@ -17,7 +17,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.createDowntime", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); DowntimeCreateRequest body = diff --git a/examples/v2/downtimes/GetDowntime.java b/examples/v2/downtimes/GetDowntime.java index e582c5d1dc4..fad359fccda 100644 --- a/examples/v2/downtimes/GetDowntime.java +++ b/examples/v2/downtimes/GetDowntime.java @@ -8,7 +8,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getDowntime", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); // there is a valid "downtime_v2" in the system diff --git a/examples/v2/downtimes/ListDowntimes.java b/examples/v2/downtimes/ListDowntimes.java index a2746d1074a..2aea9c0ed3e 100644 --- a/examples/v2/downtimes/ListDowntimes.java +++ b/examples/v2/downtimes/ListDowntimes.java @@ -8,7 +8,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listDowntimes", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); try { diff --git a/examples/v2/downtimes/ListDowntimes_805770330.java b/examples/v2/downtimes/ListDowntimes_805770330.java index 292e1625f19..90e1a8e4642 100644 --- a/examples/v2/downtimes/ListDowntimes_805770330.java +++ b/examples/v2/downtimes/ListDowntimes_805770330.java @@ -9,7 +9,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listDowntimes", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); try { diff --git a/examples/v2/downtimes/ListMonitorDowntimes.java b/examples/v2/downtimes/ListMonitorDowntimes.java index e106364a0b8..82454d7c4f4 100644 --- a/examples/v2/downtimes/ListMonitorDowntimes.java +++ b/examples/v2/downtimes/ListMonitorDowntimes.java @@ -8,7 +8,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listMonitorDowntimes", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); try { diff --git a/examples/v2/downtimes/ListMonitorDowntimes_128979780.java b/examples/v2/downtimes/ListMonitorDowntimes_128979780.java index 1b86e95fc7a..4f21cbc875a 100644 --- a/examples/v2/downtimes/ListMonitorDowntimes_128979780.java +++ b/examples/v2/downtimes/ListMonitorDowntimes_128979780.java @@ -8,7 +8,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listMonitorDowntimes", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); try { diff --git a/examples/v2/downtimes/UpdateDowntime.java b/examples/v2/downtimes/UpdateDowntime.java index c2a14ab7695..87f25670049 100644 --- a/examples/v2/downtimes/UpdateDowntime.java +++ b/examples/v2/downtimes/UpdateDowntime.java @@ -12,7 +12,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.updateDowntime", true); DowntimesApi apiInstance = new DowntimesApi(defaultClient); // there is a valid "downtime_v2" in the system diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 8379583fed5..ce013b71225 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -367,12 +367,6 @@ public class ApiClient { new HashMap() { { put("v2.createCIAppPipelineEvent", false); - put("v2.cancelDowntime", false); - put("v2.createDowntime", false); - put("v2.getDowntime", false); - put("v2.listDowntimes", false); - put("v2.listMonitorDowntimes", false); - put("v2.updateDowntime", false); put("v2.listEvents", false); put("v2.searchEvents", false); put("v2.createIncident", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/DowntimesApi.java b/src/main/java/com/datadog/api/client/v2/api/DowntimesApi.java index 753560a02b0..ab12a8f8757 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DowntimesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DowntimesApi.java @@ -96,13 +96,6 @@ public CompletableFuture cancelDowntimeAsync(String downtimeId) { * */ public ApiResponse cancelDowntimeWithHttpInfo(String downtimeId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "cancelDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; // verify the required parameter 'downtimeId' is set @@ -147,16 +140,6 @@ public ApiResponse cancelDowntimeWithHttpInfo(String downtimeId) throws Ap * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> cancelDowntimeWithHttpInfoAsync(String downtimeId) { - // Check if unstable operation is enabled - String operationId = "cancelDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; // verify the required parameter 'downtimeId' is set @@ -249,13 +232,6 @@ public CompletableFuture createDowntimeAsync(DowntimeCreateReq */ public ApiResponse createDowntimeWithHttpInfo(DowntimeCreateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -298,16 +274,6 @@ public ApiResponse createDowntimeWithHttpInfo(DowntimeCreateRe */ public CompletableFuture> createDowntimeWithHttpInfoAsync( DowntimeCreateRequest body) { - // Check if unstable operation is enabled - String operationId = "createDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -450,13 +416,6 @@ public CompletableFuture getDowntimeAsync( */ public ApiResponse getDowntimeWithHttpInfo( String downtimeId, GetDowntimeOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; // verify the required parameter 'downtimeId' is set @@ -507,16 +466,6 @@ public ApiResponse getDowntimeWithHttpInfo( */ public CompletableFuture> getDowntimeWithHttpInfoAsync( String downtimeId, GetDowntimeOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "getDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; // verify the required parameter 'downtimeId' is set @@ -748,13 +697,6 @@ public PaginationIterable listDowntimesWithPagination( */ public ApiResponse listDowntimesWithHttpInfo( ListDowntimesOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listDowntimes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; Boolean currentOnly = parameters.currentOnly; String include = parameters.include; @@ -801,16 +743,6 @@ public ApiResponse listDowntimesWithHttpInfo( */ public CompletableFuture> listDowntimesWithHttpInfoAsync( ListDowntimesOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listDowntimes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; Boolean currentOnly = parameters.currentOnly; String include = parameters.include; @@ -900,13 +832,6 @@ public CompletableFuture listMonitorDowntimesAsync */ public ApiResponse listMonitorDowntimesWithHttpInfo(Long monitorId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listMonitorDowntimes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; // verify the required parameter 'monitorId' is set @@ -951,17 +876,6 @@ public ApiResponse listMonitorDowntimesWithHttpInf */ public CompletableFuture> listMonitorDowntimesWithHttpInfoAsync(Long monitorId) { - // Check if unstable operation is enabled - String operationId = "listMonitorDowntimes"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; // verify the required parameter 'monitorId' is set @@ -1061,13 +975,6 @@ public CompletableFuture updateDowntimeAsync( */ public ApiResponse updateDowntimeWithHttpInfo( String downtimeId, DowntimeUpdateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "updateDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = body; // verify the required parameter 'downtimeId' is set @@ -1120,16 +1027,6 @@ public ApiResponse updateDowntimeWithHttpInfo( */ public CompletableFuture> updateDowntimeWithHttpInfoAsync( String downtimeId, DowntimeUpdateRequest body) { - // Check if unstable operation is enabled - String operationId = "updateDowntime"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = body; // verify the required parameter 'downtimeId' is set diff --git a/src/test/resources/com/datadog/api/client/v2/api/downtimes.feature b/src/test/resources/com/datadog/api/client/v2/api/downtimes.feature index 35c4a65f020..425fb5f2182 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/downtimes.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/downtimes.feature @@ -16,7 +16,6 @@ Feature: Downtimes @skip-validation @team:DataDog/monitor-app Scenario: Cancel a downtime returns "Downtime not found" response Given new "CancelDowntime" request - And operation "CancelDowntime" enabled And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" When the request is sent Then the response status is 404 Downtime not found @@ -24,7 +23,6 @@ Feature: Downtimes @team:DataDog/monitor-app Scenario: Cancel a downtime returns "OK" response Given there is a valid "downtime_v2" in the system - And operation "CancelDowntime" enabled And new "CancelDowntime" request And request contains "downtime_id" parameter from "downtime_v2.data.id" When the request is sent @@ -33,7 +31,6 @@ Feature: Downtimes @skip-validation @team:DataDog/monitor-app Scenario: Get a downtime returns "Bad Request" response Given new "GetDowntime" request - And operation "GetDowntime" enabled And request contains "downtime_id" parameter with value "INVALID_UUID_LENGTH" When the request is sent Then the response status is 400 Bad Request @@ -41,7 +38,6 @@ Feature: Downtimes @skip-validation @team:DataDog/monitor-app Scenario: Get a downtime returns "Not Found" response Given new "GetDowntime" request - And operation "GetDowntime" enabled And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" When the request is sent Then the response status is 404 Not Found @@ -49,7 +45,6 @@ Feature: Downtimes @team:DataDog/monitor-app Scenario: Get a downtime returns "OK" response Given there is a valid "downtime_v2" in the system - And operation "GetDowntime" enabled And new "GetDowntime" request And request contains "downtime_id" parameter from "downtime_v2.data.id" When the request is sent @@ -58,16 +53,14 @@ Feature: Downtimes @generated @skip @team:DataDog/monitor-app Scenario: Get active downtimes for a monitor returns "Monitor Not Found error" response - Given operation "ListMonitorDowntimes" enabled - And new "ListMonitorDowntimes" request + Given new "ListMonitorDowntimes" request And request contains "monitor_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Monitor Not Found error @generated @skip @team:DataDog/monitor-app Scenario: Get active downtimes for a monitor returns "OK" response - Given operation "ListMonitorDowntimes" enabled - And new "ListMonitorDowntimes" request + Given new "ListMonitorDowntimes" request And request contains "monitor_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @@ -75,7 +68,6 @@ Feature: Downtimes @team:DataDog/monitor-app Scenario: Get all downtimes for a monitor returns "Monitor Not Found error" response Given new "ListMonitorDowntimes" request - And operation "ListMonitorDowntimes" enabled And request contains "monitor_id" parameter with value 0 When the request is sent Then the response status is 404 Monitor Not Found error @@ -83,7 +75,6 @@ Feature: Downtimes @replay-only @team:DataDog/monitor-app Scenario: Get all downtimes for a monitor returns "OK" response Given new "ListMonitorDowntimes" request - And operation "ListMonitorDowntimes" enabled And request contains "monitor_id" parameter with value 35534610 When the request is sent Then the response status is 200 OK @@ -93,15 +84,13 @@ Feature: Downtimes @replay-only @team:DataDog/monitor-app Scenario: Get all downtimes returns "OK" response Given new "ListDowntimes" request - And operation "ListDowntimes" enabled When the request is sent Then the response status is 200 OK And the response "data" has item with field "id" with value "1dcb33f8-b23a-11ed-ae77-da7ad0900002" @replay-only @skip-validation @team:DataDog/monitor-app @with-pagination Scenario: Get all downtimes returns "OK" response with pagination - Given operation "ListDowntimes" enabled - And new "ListDowntimes" request + Given new "ListDowntimes" request And request contains "page[limit]" parameter with value 2 When the request with pagination is sent Then the response status is 200 OK @@ -110,7 +99,6 @@ Feature: Downtimes @skip-validation @team:DataDog/monitor-app Scenario: Schedule a downtime returns "Bad Request" response Given new "CreateDowntime" request - And operation "CreateDowntime" enabled And body with value { "data": { "attributes": { "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "BAD_SCOPE_MISSING_KEY_VALUE_FORMAT", "schedule": {"start": null } }, "type": "downtime" } } When the request is sent Then the response status is 400 Bad Request @@ -118,7 +106,6 @@ Feature: Downtimes @team:DataDog/monitor-app Scenario: Schedule a downtime returns "OK" response Given new "CreateDowntime" request - And operation "CreateDowntime" enabled And body with value { "data": { "attributes": { "message": "dark forest", "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "test:{{ unique_lower_alnum }}", "schedule": {"start": null } }, "type": "downtime" } } When the request is sent Then the response status is 200 OK @@ -127,7 +114,6 @@ Feature: Downtimes @skip-java @skip-python @skip-ruby @skip-typescript @skip-validation @team:DataDog/monitor-app Scenario: Update a downtime returns "Bad Request" response Given there is a valid "downtime_v2" in the system - And operation "UpdateDowntime" enabled And new "UpdateDowntime" request And request contains "downtime_id" parameter from "downtime_v2.data.id" And body with value {"data": {"attributes": {"invalid_field": "sophon"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}} @@ -137,7 +123,6 @@ Feature: Downtimes @skip-validation @team:DataDog/monitor-app Scenario: Update a downtime returns "Downtime not found" response Given new "UpdateDowntime" request - And operation "UpdateDowntime" enabled And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" And body with value {"data": {"attributes": {"message": "test msg"}, "id": "00000000-0000-1234-0000-000000000000", "type": "downtime"}} When the request is sent @@ -146,7 +131,6 @@ Feature: Downtimes @team:DataDog/monitor-app Scenario: Update a downtime returns "OK" response Given there is a valid "downtime_v2" in the system - And operation "UpdateDowntime" enabled And new "UpdateDowntime" request And request contains "downtime_id" parameter from "downtime_v2.data.id" And body with value {"data": {"attributes": {"message": "light speed"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}}