Skip to content

Commit 156ce76

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 389040e of spec repo
1 parent cb79f27 commit 156ce76

File tree

38 files changed

+3787
-8
lines changed

38 files changed

+3787
-8
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 406 additions & 0 deletions
Large diffs are not rendered by default.

examples/v1/logs-pipelines/CreateLogsPipeline.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
processors: [
1212
DatadogAPIClient::V1::LogsGrokParser.new({
1313
grok: DatadogAPIClient::V1::LogsGrokParserRules.new({
14-
match_rules: 'rule_name_1 foo\nrule_name_2 bar\n',
15-
support_rules: 'rule_name_1 foo\nrule_name_2 bar\n',
14+
match_rules: 'rule_name_1 foo\nrule_name_2 bar',
15+
support_rules: 'rule_name_1 foo\nrule_name_2 bar',
1616
}),
1717
is_enabled: false,
1818
samples: [],

examples/v1/logs-pipelines/UpdateLogsPipeline.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
processors: [
1212
DatadogAPIClient::V1::LogsGrokParser.new({
1313
grok: DatadogAPIClient::V1::LogsGrokParserRules.new({
14-
match_rules: 'rule_name_1 foo\nrule_name_2 bar\n',
15-
support_rules: 'rule_name_1 foo\nrule_name_2 bar\n',
14+
match_rules: 'rule_name_1 foo\nrule_name_2 bar',
15+
support_rules: 'rule_name_1 foo\nrule_name_2 bar',
1616
}),
1717
is_enabled: false,
1818
samples: [],
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# POST request to resolve vulnerable symbols returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_sca_resolve_vulnerable_symbols".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::StaticAnalysisAPI.new
8+
9+
body = DatadogAPIClient::V2::ResolveVulnerableSymbolsRequest.new({
10+
data: DatadogAPIClient::V2::ResolveVulnerableSymbolsRequestData.new({
11+
attributes: DatadogAPIClient::V2::ResolveVulnerableSymbolsRequestDataAttributes.new({
12+
purls: [],
13+
}),
14+
type: DatadogAPIClient::V2::ResolveVulnerableSymbolsRequestDataType::RESOLVE_VULNERABLE_SYMBOLS_REQUEST,
15+
}),
16+
})
17+
p api_instance.create_sca_resolve_vulnerable_symbols(body)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Post dependencies for analysis returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_sca_result".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::StaticAnalysisAPI.new
8+
9+
body = DatadogAPIClient::V2::ScaRequest.new({
10+
data: DatadogAPIClient::V2::ScaRequestData.new({
11+
attributes: DatadogAPIClient::V2::ScaRequestDataAttributes.new({
12+
commit: DatadogAPIClient::V2::ScaRequestDataAttributesCommit.new({}),
13+
dependencies: [
14+
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItems.new({
15+
exclusions: [],
16+
locations: [
17+
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItems.new({
18+
block: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
19+
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
20+
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
21+
}),
22+
name: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
23+
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
24+
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
25+
}),
26+
namespace: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
27+
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
28+
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
29+
}),
30+
version: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
31+
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
32+
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
33+
}),
34+
}),
35+
],
36+
reachable_symbol_properties: [
37+
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.new({}),
38+
],
39+
}),
40+
],
41+
files: [
42+
DatadogAPIClient::V2::ScaRequestDataAttributesFilesItems.new({}),
43+
],
44+
relations: [
45+
DatadogAPIClient::V2::ScaRequestDataAttributesRelationsItems.new({
46+
depends_on: [],
47+
}),
48+
],
49+
repository: DatadogAPIClient::V2::ScaRequestDataAttributesRepository.new({}),
50+
vulnerabilities: [
51+
DatadogAPIClient::V2::ScaRequestDataAttributesVulnerabilitiesItems.new({
52+
affects: [
53+
DatadogAPIClient::V2::ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.new({}),
54+
],
55+
}),
56+
],
57+
}),
58+
type: DatadogAPIClient::V2::ScaRequestDataType::SCAREQUESTS,
59+
}),
60+
})
61+
p api_instance.create_sca_result(body)

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,12 @@
28772877
"v2.ListSpans" => {
28782878
"body" => "SpansListRequest",
28792879
},
2880+
"v2.CreateSCAResult" => {
2881+
"body" => "ScaRequest",
2882+
},
2883+
"v2.CreateSCAResolveVulnerableSymbols" => {
2884+
"body" => "ResolveVulnerableSymbolsRequest",
2885+
},
28802886
"v2.SetOnDemandConcurrencyCap" => {
28812887
"body" => "OnDemandConcurrencyCapAttributes",
28822888
},

features/v1/logs_pipelines.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Feature: Logs Pipelines
2424
@generated @skip @team:DataDog/event-platform-experience
2525
Scenario: Create a pipeline returns "Bad Request" response
2626
Given new "CreateLogsPipeline" request
27-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
27+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
2828
When the request is sent
2929
Then the response status is 400 Bad Request
3030

3131
@generated @skip @team:DataDog/event-platform-experience
3232
Scenario: Create a pipeline returns "OK" response
3333
Given new "CreateLogsPipeline" request
34-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
34+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
3535
When the request is sent
3636
Then the response status is 200 OK
3737

@@ -128,15 +128,15 @@ Feature: Logs Pipelines
128128
Scenario: Update a pipeline returns "Bad Request" response
129129
Given new "UpdateLogsPipeline" request
130130
And request contains "pipeline_id" parameter from "REPLACE.ME"
131-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
131+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
132132
When the request is sent
133133
Then the response status is 400 Bad Request
134134

135135
@generated @skip @team:DataDog/event-platform-experience
136136
Scenario: Update a pipeline returns "OK" response
137137
Given new "UpdateLogsPipeline" request
138138
And request contains "pipeline_id" parameter from "REPLACE.ME"
139-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
139+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
140140
When the request is sent
141141
Then the response status is 200 OK
142142

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@endpoint(static-analysis) @endpoint(static-analysis-v2)
2+
Feature: Static Analysis
3+
API for static analysis
4+
5+
Background:
6+
Given a valid "apiKeyAuth" key in the system
7+
And a valid "appKeyAuth" key in the system
8+
And an instance of "StaticAnalysis" API
9+
10+
@generated @skip @team:DataDog/k9-vm-sca
11+
Scenario: POST request to resolve vulnerable symbols returns "OK" response
12+
Given operation "CreateSCAResolveVulnerableSymbols" enabled
13+
And new "CreateSCAResolveVulnerableSymbols" request
14+
And body with value {"data": {"attributes": {"purls": []}, "type": "resolve-vulnerable-symbols-request"}}
15+
When the request is sent
16+
Then the response status is 200 OK
17+
18+
@generated @skip @team:DataDog/k9-vm-sca
19+
Scenario: Post dependencies for analysis returns "OK" response
20+
Given operation "CreateSCAResult" enabled
21+
And new "CreateSCAResult" request
22+
And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}}
23+
When the request is sent
24+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3780,6 +3780,18 @@
37803780
"type": "safe"
37813781
}
37823782
},
3783+
"CreateSCAResult": {
3784+
"tag": "Static Analysis",
3785+
"undo": {
3786+
"type": "safe"
3787+
}
3788+
},
3789+
"CreateSCAResolveVulnerableSymbols": {
3790+
"tag": "Static Analysis",
3791+
"undo": {
3792+
"type": "safe"
3793+
}
3794+
},
37833795
"GetOnDemandConcurrencyCap": {
37843796
"tag": "Synthetics",
37853797
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ def initialize
286286
"v2.get_slo_report": false,
287287
"v2.get_slo_report_job_status": false,
288288
"v2.get_spa_recommendations": false,
289+
"v2.create_sca_resolve_vulnerable_symbols": false,
290+
"v2.create_sca_result": false,
289291
"v2.add_member_team": false,
290292
"v2.list_member_teams": false,
291293
"v2.remove_member_team": false,

0 commit comments

Comments
 (0)