Skip to content

Commit 4cbfaa3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 61cdba5 of spec repo
1 parent 0d344af commit 4cbfaa3

File tree

39 files changed

+2599
-8
lines changed

39 files changed

+2599
-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.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const params: v1.LogsPipelinesApiCreateLogsPipelineRequest = {
1616
processors: [
1717
{
1818
grok: {
19-
matchRules: "rule_name_1 foo\nrule_name_2 bar\n",
20-
supportRules: "rule_name_1 foo\nrule_name_2 bar\n",
19+
matchRules: "rule_name_1 foo\nrule_name_2 bar",
20+
supportRules: "rule_name_1 foo\nrule_name_2 bar",
2121
},
2222
isEnabled: false,
2323
samples: [],

examples/v1/logs-pipelines/UpdateLogsPipeline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const params: v1.LogsPipelinesApiUpdateLogsPipelineRequest = {
1616
processors: [
1717
{
1818
grok: {
19-
matchRules: "rule_name_1 foo\nrule_name_2 bar\n",
20-
supportRules: "rule_name_1 foo\nrule_name_2 bar\n",
19+
matchRules: "rule_name_1 foo\nrule_name_2 bar",
20+
supportRules: "rule_name_1 foo\nrule_name_2 bar",
2121
},
2222
isEnabled: false,
2323
samples: [],
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* POST request to resolve vulnerable symbols returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createSCAResolveVulnerableSymbols"] = true;
9+
const apiInstance = new v2.StaticAnalysisApi(configuration);
10+
11+
const params: v2.StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
purls: [],
16+
},
17+
type: "resolve-vulnerable-symbols-request",
18+
},
19+
},
20+
};
21+
22+
apiInstance
23+
.createSCAResolveVulnerableSymbols(params)
24+
.then((data: v2.ResolveVulnerableSymbolsResponse) => {
25+
console.log(
26+
"API called successfully. Returned data: " + JSON.stringify(data)
27+
);
28+
})
29+
.catch((error: any) => console.error(error));
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* Post dependencies for analysis returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createSCAResult"] = true;
9+
const apiInstance = new v2.StaticAnalysisApi(configuration);
10+
11+
const params: v2.StaticAnalysisApiCreateSCAResultRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
commit: {},
16+
dependencies: [
17+
{
18+
exclusions: [],
19+
locations: [
20+
{
21+
block: {
22+
end: {},
23+
start: {},
24+
},
25+
name: {
26+
end: {},
27+
start: {},
28+
},
29+
namespace: {
30+
end: {},
31+
start: {},
32+
},
33+
version: {
34+
end: {},
35+
start: {},
36+
},
37+
},
38+
],
39+
reachableSymbolProperties: [{}],
40+
},
41+
],
42+
files: [{}],
43+
relations: [
44+
{
45+
dependsOn: [],
46+
},
47+
],
48+
repository: {},
49+
vulnerabilities: [
50+
{
51+
affects: [{}],
52+
},
53+
],
54+
},
55+
type: "scarequests",
56+
},
57+
},
58+
};
59+
60+
apiInstance
61+
.createSCAResult(params)
62+
.then((data: any) => {
63+
console.log(
64+
"API called successfully. Returned data: " + JSON.stringify(data)
65+
);
66+
})
67+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8127,6 +8127,20 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
81278127
},
81288128
"operationResponseType": "SpansListResponse",
81298129
},
8130+
"v2.CreateSCAResult": {
8131+
"body": {
8132+
"type": "ScaRequest",
8133+
"format": "",
8134+
},
8135+
"operationResponseType": "{}",
8136+
},
8137+
"v2.CreateSCAResolveVulnerableSymbols": {
8138+
"body": {
8139+
"type": "ResolveVulnerableSymbolsRequest",
8140+
"format": "",
8141+
},
8142+
"operationResponseType": "ResolveVulnerableSymbolsResponse",
8143+
},
81308144
"v2.GetOnDemandConcurrencyCap": {
81318145
"operationResponseType": "OnDemandConcurrencyCapResponse",
81328146
},

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/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/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
@@ -3768,6 +3768,18 @@
37683768
"type": "safe"
37693769
}
37703770
},
3771+
"CreateSCAResult": {
3772+
"tag": "Static Analysis",
3773+
"undo": {
3774+
"type": "safe"
3775+
}
3776+
},
3777+
"CreateSCAResolveVulnerableSymbols": {
3778+
"tag": "Static Analysis",
3779+
"undo": {
3780+
"type": "safe"
3781+
}
3782+
},
37713783
"GetOnDemandConcurrencyCap": {
37723784
"tag": "Synthetics",
37733785
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ export function createConfiguration(
318318
"v2.getSLOReport": false,
319319
"v2.getSLOReportJobStatus": false,
320320
"v2.getSPARecommendations": false,
321+
"v2.createSCAResolveVulnerableSymbols": false,
322+
"v2.createSCAResult": false,
321323
"v2.addMemberTeam": false,
322324
"v2.listMemberTeams": false,
323325
"v2.removeMemberTeam": false,

0 commit comments

Comments
 (0)