Skip to content

Commit d5653c3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 254811f of spec repo
1 parent 1c00fa8 commit d5653c3

File tree

36 files changed

+2593
-0
lines changed

36 files changed

+2593
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 407 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.postSCAResolveVulnerableSymbols"] = true;
9+
const apiInstance = new v2.StaticAnalysisApi(configuration);
10+
11+
const params: v2.StaticAnalysisApiPostSCAResolveVulnerableSymbolsRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
purls: [],
16+
},
17+
type: "resolve-vulnerable-symbols-request",
18+
},
19+
},
20+
};
21+
22+
apiInstance
23+
.postSCAResolveVulnerableSymbols(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.postSCAResult"] = true;
9+
const apiInstance = new v2.StaticAnalysisApi(configuration);
10+
11+
const params: v2.StaticAnalysisApiPostSCAResultRequest = {
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+
.postSCAResult(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
@@ -8099,6 +8099,20 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
80998099
},
81008100
"operationResponseType": "SpansListResponse",
81018101
},
8102+
"v2.PostSCAResult": {
8103+
"body": {
8104+
"type": "ScaRequest",
8105+
"format": "",
8106+
},
8107+
"operationResponseType": "{}",
8108+
},
8109+
"v2.PostSCAResolveVulnerableSymbols": {
8110+
"body": {
8111+
"type": "ResolveVulnerableSymbolsRequest",
8112+
"format": "",
8113+
},
8114+
"operationResponseType": "ResolveVulnerableSymbolsResponse",
8115+
},
81028116
"v2.GetOnDemandConcurrencyCap": {
81038117
"operationResponseType": "OnDemandConcurrencyCapResponse",
81048118
},
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 "PostSCAResolveVulnerableSymbols" enabled
13+
And new "PostSCAResolveVulnerableSymbols" 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 "PostSCAResult" enabled
21+
And new "PostSCAResult" 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3737,6 +3737,22 @@
37373737
"type": "safe"
37383738
}
37393739
},
3740+
"PostSCAResult": {
3741+
"tag": "Static Analysis",
3742+
"undo": {
3743+
"operationId": "TODO",
3744+
"parameters": [],
3745+
"type": "unsafe"
3746+
}
3747+
},
3748+
"PostSCAResolveVulnerableSymbols": {
3749+
"tag": "Static Analysis",
3750+
"undo": {
3751+
"operationId": "TODO",
3752+
"parameters": [],
3753+
"type": "unsafe"
3754+
}
3755+
},
37403756
"GetOnDemandConcurrencyCap": {
37413757
"tag": "Synthetics",
37423758
"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.postSCAResolveVulnerableSymbols": false,
322+
"v2.postSCAResult": false,
321323
"v2.addMemberTeam": false,
322324
"v2.listMemberTeams": false,
323325
"v2.removeMemberTeam": false,

0 commit comments

Comments
 (0)