diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 53a4ea6a1a50..d92bb93db9ab 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -179962,9 +179962,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. @@ -180038,9 +180035,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/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index c713293f4632..10c4c66afa1b 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/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 diff --git a/services/security_monitoring/src/v2/SecurityMonitoringApi.ts b/services/security_monitoring/src/v2/SecurityMonitoringApi.ts index 2168c5d521f2..64985ec90256 100644 --- a/services/security_monitoring/src/v2/SecurityMonitoringApi.ts +++ b/services/security_monitoring/src/v2/SecurityMonitoringApi.ts @@ -450,14 +450,6 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; - if ( - !_config.unstableOperations["SecurityMonitoringApi.v2.attachLinearIssue"] - ) { - throw new Error( - "Unstable operation 'attachLinearIssue' is disabled. Enable it by setting `configuration.unstableOperations['SecurityMonitoringApi.v2.attachLinearIssue'] = true`", - ); - } - // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "attachLinearIssue"); @@ -1646,14 +1638,6 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; - if ( - !_config.unstableOperations["SecurityMonitoringApi.v2.createLinearIssues"] - ) { - throw new Error( - "Unstable operation 'createLinearIssues' is disabled. Enable it by setting `configuration.unstableOperations['SecurityMonitoringApi.v2.createLinearIssues'] = true`", - ); - } - // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "createLinearIssues");