diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 680f08792e5..41ee660fae5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -179811,9 +179811,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: >- Create Linear issues for security findings. @@ -179887,9 +179884,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/findings/mute: patch: description: >- diff --git a/examples/v2/security-monitoring/AttachLinearIssue.java b/examples/v2/security-monitoring/AttachLinearIssue.java index b15c111a116..c9d7ef3c797 100644 --- a/examples/v2/security-monitoring/AttachLinearIssue.java +++ b/examples/v2/security-monitoring/AttachLinearIssue.java @@ -20,7 +20,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.attachLinearIssue", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); AttachLinearIssueRequest body = diff --git a/examples/v2/security-monitoring/CreateLinearIssues.java b/examples/v2/security-monitoring/CreateLinearIssues.java index 1f1eee61bd0..5c170787abd 100644 --- a/examples/v2/security-monitoring/CreateLinearIssues.java +++ b/examples/v2/security-monitoring/CreateLinearIssues.java @@ -21,7 +21,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.createLinearIssues", true); SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); CreateLinearIssueRequestArray body = diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index e7ab0a985b6..2dd77f097dc 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -919,7 +919,6 @@ public class ApiClient { put("v2.listAWSCloudAuthPersonaMappings", false); put("v2.activateContentPack", false); put("v2.activateIntegration", false); - put("v2.attachLinearIssue", false); put("v2.batchGetSecurityMonitoringDatasetDependencies", false); put("v2.bulkCreateSampleLogGenerationSubscriptions", false); put("v2.bulkExportSecurityMonitoringTerraformResources", false); @@ -927,7 +926,6 @@ public class ApiClient { put("v2.convertJobResultToSignal", false); put("v2.convertSecurityMonitoringTerraformResource", false); put("v2.createIoCTriageState", false); - put("v2.createLinearIssues", false); put("v2.createSampleLogGenerationSubscription", false); put("v2.createSecurityFindingsAutomationDueDateRule", false); put("v2.createSecurityFindingsAutomationMuteRule", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 4b15d75a3fb..97f78fc6f0f 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -951,13 +951,6 @@ public CompletableFuture attachLinearIssueAsync( */ public ApiResponse attachLinearIssueWithHttpInfo( AttachLinearIssueRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "attachLinearIssue"; - 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 @@ -1000,16 +993,6 @@ public ApiResponse attachLinearIssueWithHttpInfo( */ public CompletableFuture> attachLinearIssueWithHttpInfoAsync( AttachLinearIssueRequest body) { - // Check if unstable operation is enabled - String operationId = "attachLinearIssue"; - 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 @@ -3985,13 +3968,6 @@ public CompletableFuture createLinearIssuesAsync( */ public ApiResponse createLinearIssuesWithHttpInfo( CreateLinearIssueRequestArray body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createLinearIssues"; - 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 @@ -4034,16 +4010,6 @@ public ApiResponse createLinearIssuesWithHttpInfo( */ public CompletableFuture> createLinearIssuesWithHttpInfoAsync(CreateLinearIssueRequestArray body) { - // Check if unstable operation is enabled - String operationId = "createLinearIssues"; - 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 diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index c713293f463..10c4c66afa1 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -140,24 +140,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Linear issue returns "Bad Request" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Linear issue returns "Not Found" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Linear issue returns "OK" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} When the request is sent Then the response status is 200 OK @@ -580,24 +577,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Bad Request" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Created" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Not Found" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 404 Not Found