Skip to content

Commit 259f944

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ed00345 of spec repo
1 parent b35bbbf commit 259f944

File tree

36 files changed

+2591
-0
lines changed

36 files changed

+2591
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 406 additions & 0 deletions
Large diffs are not rendered by default.
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
@@ -8417,6 +8417,20 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
84178417
},
84188418
"operationResponseType": "SpansListResponse",
84198419
},
8420+
"v2.CreateSCAResult": {
8421+
"body": {
8422+
"type": "ScaRequest",
8423+
"format": "",
8424+
},
8425+
"operationResponseType": "{}",
8426+
},
8427+
"v2.CreateSCAResolveVulnerableSymbols": {
8428+
"body": {
8429+
"type": "ResolveVulnerableSymbolsRequest",
8430+
"format": "",
8431+
},
8432+
"operationResponseType": "ResolveVulnerableSymbolsResponse",
8433+
},
84208434
"v2.GetOnDemandConcurrencyCap": {
84218435
"operationResponseType": "OnDemandConcurrencyCapResponse",
84228436
},
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
@@ -3962,6 +3962,18 @@
39623962
"type": "safe"
39633963
}
39643964
},
3965+
"CreateSCAResult": {
3966+
"tag": "Static Analysis",
3967+
"undo": {
3968+
"type": "safe"
3969+
}
3970+
},
3971+
"CreateSCAResolveVulnerableSymbols": {
3972+
"tag": "Static Analysis",
3973+
"undo": {
3974+
"type": "safe"
3975+
}
3976+
},
39653977
"GetOnDemandConcurrencyCap": {
39663978
"tag": "Synthetics",
39673979
"undo": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ export function createConfiguration(
320320
"v2.getSLOReport": false,
321321
"v2.getSLOReportJobStatus": false,
322322
"v2.getSPARecommendations": false,
323+
"v2.createSCAResolveVulnerableSymbols": false,
324+
"v2.createSCAResult": false,
323325
"v2.addMemberTeam": false,
324326
"v2.listMemberTeams": false,
325327
"v2.removeMemberTeam": false,

0 commit comments

Comments
 (0)