Skip to content

Commit 562e508

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8ff9b6bd of spec repo
1 parent 2d8705f commit 562e508

File tree

8 files changed

+10
-30
lines changed

8 files changed

+10
-30
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-04-17 13:26:11.488046",
8-
"spec_repo_commit": "12ab5180"
7+
"regenerated": "2025-04-18 16:37:12.793461",
8+
"spec_repo_commit": "8ff9b6bd"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-17 13:26:11.504561",
13-
"spec_repo_commit": "12ab5180"
12+
"regenerated": "2025-04-18 16:37:12.809005",
13+
"spec_repo_commit": "8ff9b6bd"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52698,7 +52698,6 @@ paths:
5269852698
operator: OR
5269952699
permissions:
5270052700
- security_monitoring_rules_read
52701-
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.'
5270252701
/api/v2/security_monitoring/signals:
5270352702
get:
5270452703
description: 'The list endpoint returns security signals that match a search
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Get a rule's version history returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.get_rule_version_history".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
85
p api_instance.get_rule_version_history("rule_id")

examples/v2/security-monitoring/GetRuleVersionHistory_2467565841.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Get rule version history returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.get_rule_version_history".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
85

96
# there is a valid "security_rule" in the system

features/v2/security_monitoring.feature

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,24 +604,21 @@ Feature: Security Monitoring
604604

605605
@generated @skip @team:DataDog/k9-cloud-security-platform
606606
Scenario: Get a rule's version history returns "Bad Request" response
607-
Given operation "GetRuleVersionHistory" enabled
608-
And new "GetRuleVersionHistory" request
607+
Given new "GetRuleVersionHistory" request
609608
And request contains "rule_id" parameter from "REPLACE.ME"
610609
When the request is sent
611610
Then the response status is 400 Bad Request
612611

613612
@generated @skip @team:DataDog/k9-cloud-security-platform
614613
Scenario: Get a rule's version history returns "Not Found" response
615-
Given operation "GetRuleVersionHistory" enabled
616-
And new "GetRuleVersionHistory" request
614+
Given new "GetRuleVersionHistory" request
617615
And request contains "rule_id" parameter from "REPLACE.ME"
618616
When the request is sent
619617
Then the response status is 404 Not Found
620618

621619
@generated @skip @team:DataDog/k9-cloud-security-platform
622620
Scenario: Get a rule's version history returns "OK" response
623-
Given operation "GetRuleVersionHistory" enabled
624-
And new "GetRuleVersionHistory" request
621+
Given new "GetRuleVersionHistory" request
625622
And request contains "rule_id" parameter from "REPLACE.ME"
626623
When the request is sent
627624
Then the response status is 200 OK
@@ -737,8 +734,7 @@ Feature: Security Monitoring
737734

738735
@skip-go @skip-java @skip-ruby @team:DataDog/k9-cloud-security-platform
739736
Scenario: Get rule version history returns "OK" response
740-
Given operation "GetRuleVersionHistory" enabled
741-
And new "GetRuleVersionHistory" request
737+
Given new "GetRuleVersionHistory" request
742738
And there is a valid "security_rule" in the system
743739
And request contains "rule_id" parameter from "security_rule.id"
744740
When the request is sent

lib/datadog_api_client/configuration.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ def initialize
241241
"v2.delete_historical_job": false,
242242
"v2.get_finding": false,
243243
"v2.get_historical_job": false,
244-
"v2.get_rule_version_history": false,
245244
"v2.get_sbom": false,
246245
"v2.list_findings": false,
247246
"v2.list_historical_jobs": false,

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,12 +1416,6 @@ def get_rule_version_history(rule_id, opts = {})
14161416
# @option opts [Integer] :page_number Specific page number to return.
14171417
# @return [Array<(GetRuleVersionHistoryResponse, Integer, Hash)>] GetRuleVersionHistoryResponse data, response status code and response headers
14181418
def get_rule_version_history_with_http_info(rule_id, opts = {})
1419-
unstable_enabled = @api_client.config.unstable_operations["v2.get_rule_version_history".to_sym]
1420-
if unstable_enabled
1421-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rule_version_history")
1422-
else
1423-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rule_version_history"))
1424-
end
14251419

14261420
if @api_client.config.debugging
14271421
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_rule_version_history ...'

lib/datadog_api_client/v2/model_base.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _deserialize(type, value)
124124
# generic array, return directly
125125
value
126126
when :UUID
127-
value
127+
value.to_s
128128
when /\AArray<(?<inner_type>.+)>\z/
129129
inner_type = Regexp.last_match[:inner_type]
130130
value.map { |v| _deserialize(inner_type, v) }
@@ -255,9 +255,7 @@ def find_and_cast_into_type(klass, data)
255255
when 'Object' # "type: object"
256256
return data if data.instance_of?(Hash)
257257
when 'UUID'
258-
raise TypeError, "Expected String, got #{uuid_string.class.name} instead." unless uuid_string.kind_of?(String)
259-
raise ArgumentError, "Invalid UUID format." unless /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/.match?(data)
260-
return data
258+
return UUIDTools::UUID.parse(data)
261259
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
262260
if data.instance_of?(Array)
263261
sub_type = Regexp.last_match[:sub_type]

0 commit comments

Comments
 (0)