Skip to content

Commit d044e23

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8bf021d3 of spec repo
1 parent fd2b767 commit d044e23

File tree

10 files changed

+32
-16
lines changed

10 files changed

+32
-16
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-02-07 15:58:46.331587",
8-
"spec_repo_commit": "1ff7c087"
7+
"regenerated": "2025-02-10 11:25:30.824040",
8+
"spec_repo_commit": "8bf021d3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-07 15:58:46.346813",
13-
"spec_repo_commit": "1ff7c087"
12+
"regenerated": "2025-02-10 11:25:30.839220",
13+
"spec_repo_commit": "8bf021d3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44069,6 +44069,9 @@ paths:
4406944069
summary: Get SBOM
4407044070
tags:
4407144071
- Security Monitoring
44072+
x-unstable: '**Note**: This endpoint is a private preview.
44073+
44074+
If you are interested in accessing this API, please [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
4407244075
/api/v2/security/signals/notification_rules:
4407344076
get:
4407444077
description: Returns the list of notification rules for security signals.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-01-31T12:04:00.490Z
1+
2025-02-10T09:34:13.361Z

cassettes/features/v2/security_monitoring/Get-SBOM-returns-Not-found-asset-not-found-response.yml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-01-31T12:04:14.913Z
1+
2025-02-10T09:34:48.919Z

cassettes/features/v2/security_monitoring/Get-SBOM-returns-OK-response.yml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Get SBOM returns "OK" response
22

33
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_sbom".to_sym] = true
6+
end
47
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
58
p api_instance.get_sbom(AssetType::REPOSITORY, "github.com/datadog/datadog-agent")

features/v2/security_monitoring.feature

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,23 +447,26 @@ Feature: Security Monitoring
447447

448448
@generated @skip @team:DataDog/asm-vm
449449
Scenario: Get SBOM returns "Bad request: The server cannot process the request due to invalid syntax in the request." response
450-
Given new "GetSBOM" request
450+
Given operation "GetSBOM" enabled
451+
And new "GetSBOM" request
451452
And request contains "asset_type" parameter from "REPLACE.ME"
452453
And request contains "filter[asset_name]" parameter from "REPLACE.ME"
453454
When the request is sent
454455
Then the response status is 400 Bad request: The server cannot process the request due to invalid syntax in the request.
455456

456457
@team:DataDog/asm-vm
457458
Scenario: Get SBOM returns "Not found: asset not found" response
458-
Given new "GetSBOM" request
459+
Given operation "GetSBOM" enabled
460+
And new "GetSBOM" request
459461
And request contains "asset_type" parameter with value "Host"
460462
And request contains "filter[asset_name]" parameter with value "unknown-host"
461463
When the request is sent
462464
Then the response status is 404 Not found: asset not found
463465

464466
@team:DataDog/asm-vm
465467
Scenario: Get SBOM returns "OK" response
466-
Given new "GetSBOM" request
468+
Given operation "GetSBOM" enabled
469+
And new "GetSBOM" request
467470
And request contains "asset_type" parameter with value "Repository"
468471
And request contains "filter[asset_name]" parameter with value "github.com/datadog/datadog-agent"
469472
When the request is sent

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def initialize
243243
"v2.delete_historical_job": false,
244244
"v2.get_finding": false,
245245
"v2.get_historical_job": false,
246+
"v2.get_sbom": false,
246247
"v2.list_findings": false,
247248
"v2.list_historical_jobs": false,
248249
"v2.mute_findings": false,

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,12 @@ def get_sbom(asset_type, filter_asset_name, opts = {})
14171417
# @option opts [String] :filter_repo_digest The container image `repo_digest` for the SBOM request. When the requested asset type is 'Image', this filter is mandatory.
14181418
# @return [Array<(GetSBOMResponse, Integer, Hash)>] GetSBOMResponse data, response status code and response headers
14191419
def get_sbom_with_http_info(asset_type, filter_asset_name, opts = {})
1420+
unstable_enabled = @api_client.config.unstable_operations["v2.get_sbom".to_sym]
1421+
if unstable_enabled
1422+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_sbom")
1423+
else
1424+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_sbom"))
1425+
end
14201426

14211427
if @api_client.config.debugging
14221428
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_sbom ...'

0 commit comments

Comments
 (0)