Skip to content

Commit 47f07a5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 934db3c of spec repo
1 parent 6bec3d5 commit 47f07a5

15 files changed

Lines changed: 751 additions & 570 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 254 additions & 214 deletions
Large diffs are not rendered by default.

cassettes/v2/Security-Monitoring_1187227211/List-vulnerable-assets-returns-Not-found-There-is-no-request-associated-with-the-provided_3107541696/recording.har

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
}
3535
],
36-
"url": "https://api.datadoghq.com/api/v2/security/assets?page%5Btoken%5D=unknown&page%5Bnumber%5D=1"
36+
"url": "https://api.datadoghq.com/api/v2/security/vulnerable-assets?page%5Btoken%5D=unknown&page%5Bnumber%5D=1"
3737
},
3838
"response": {
3939
"bodySize": 131,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* List SBOMs returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listSBOMs"] = true;
9+
const apiInstance = new v2.SecurityMonitoringApi(configuration);
10+
11+
apiInstance
12+
.listSBOMs()
13+
.then((data: v2.ListSBOMsResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));

examples/v2/security-monitoring/ListAssetsSBOMs.ts renamed to examples/v2/security-monitoring/ListSBOMs_339414484.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.listAssetsSBOMs"] = true;
8+
configuration.unstableOperations["v2.listSBOMs"] = true;
99
const apiInstance = new v2.SecurityMonitoringApi(configuration);
1010

11-
const params: v2.SecurityMonitoringApiListAssetsSBOMsRequest = {
11+
const params: v2.SecurityMonitoringApiListSBOMsRequest = {
1212
filterAssetType: "Service",
1313
filterPackageName: "pandas",
1414
};
1515

1616
apiInstance
17-
.listAssetsSBOMs(params)
18-
.then((data: v2.ListAssetsSBOMsResponse) => {
17+
.listSBOMs(params)
18+
.then((data: v2.ListSBOMsResponse) => {
1919
console.log(
2020
"API called successfully. Returned data: " + JSON.stringify(data)
2121
);

features/support/scenarios_model_mapping.ts

Lines changed: 77 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3604,78 +3604,7 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
36043604
},
36053605
"operationResponseType": "GetFindingResponse",
36063606
},
3607-
"v2.ListVulnerableAssets": {
3608-
"pageToken": {
3609-
"type": "string",
3610-
"format": "",
3611-
},
3612-
"pageNumber": {
3613-
"type": "number",
3614-
"format": "int64",
3615-
},
3616-
"filterName": {
3617-
"type": "string",
3618-
"format": "",
3619-
},
3620-
"filterType": {
3621-
"type": "AssetType",
3622-
"format": "",
3623-
},
3624-
"filterVersionFirst": {
3625-
"type": "string",
3626-
"format": "",
3627-
},
3628-
"filterVersionLast": {
3629-
"type": "string",
3630-
"format": "",
3631-
},
3632-
"filterRepositoryUrl": {
3633-
"type": "string",
3634-
"format": "",
3635-
},
3636-
"filterRisksInProduction": {
3637-
"type": "boolean",
3638-
"format": "",
3639-
},
3640-
"filterRisksUnderAttack": {
3641-
"type": "boolean",
3642-
"format": "",
3643-
},
3644-
"filterRisksIsPubliclyAccessible": {
3645-
"type": "boolean",
3646-
"format": "",
3647-
},
3648-
"filterRisksHasPrivilegedAccess": {
3649-
"type": "boolean",
3650-
"format": "",
3651-
},
3652-
"filterRisksHasAccessToSensitiveData": {
3653-
"type": "boolean",
3654-
"format": "",
3655-
},
3656-
"filterEnvironments": {
3657-
"type": "string",
3658-
"format": "",
3659-
},
3660-
"filterTeams": {
3661-
"type": "string",
3662-
"format": "",
3663-
},
3664-
"filterArch": {
3665-
"type": "string",
3666-
"format": "",
3667-
},
3668-
"filterOperatingSystemName": {
3669-
"type": "string",
3670-
"format": "",
3671-
},
3672-
"filterOperatingSystemVersion": {
3673-
"type": "string",
3674-
"format": "",
3675-
},
3676-
"operationResponseType": "ListVulnerableAssetsResponse",
3677-
},
3678-
"v2.ListAssetsSBOMs": {
3607+
"v2.ListSBOMs": {
36793608
"pageToken": {
36803609
"type": "string",
36813610
"format": "",
@@ -3708,7 +3637,7 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
37083637
"type": "SBOMComponentLicenseType",
37093638
"format": "",
37103639
},
3711-
"operationResponseType": "ListAssetsSBOMsResponse",
3640+
"operationResponseType": "ListSBOMsResponse",
37123641
},
37133642
"v2.GetSBOM": {
37143643
"assetType": {
@@ -3723,6 +3652,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
37233652
"type": "string",
37243653
"format": "",
37253654
},
3655+
"extFormat": {
3656+
"type": "SBOMFormat",
3657+
"format": "",
3658+
},
37263659
"operationResponseType": "GetSBOMResponse",
37273660
},
37283661
"v2.GetSignalNotificationRules": {
@@ -3966,6 +3899,77 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
39663899
},
39673900
"operationResponseType": "NotificationRuleResponse",
39683901
},
3902+
"v2.ListVulnerableAssets": {
3903+
"pageToken": {
3904+
"type": "string",
3905+
"format": "",
3906+
},
3907+
"pageNumber": {
3908+
"type": "number",
3909+
"format": "int64",
3910+
},
3911+
"filterName": {
3912+
"type": "string",
3913+
"format": "",
3914+
},
3915+
"filterType": {
3916+
"type": "AssetType",
3917+
"format": "",
3918+
},
3919+
"filterVersionFirst": {
3920+
"type": "string",
3921+
"format": "",
3922+
},
3923+
"filterVersionLast": {
3924+
"type": "string",
3925+
"format": "",
3926+
},
3927+
"filterRepositoryUrl": {
3928+
"type": "string",
3929+
"format": "",
3930+
},
3931+
"filterRisksInProduction": {
3932+
"type": "boolean",
3933+
"format": "",
3934+
},
3935+
"filterRisksUnderAttack": {
3936+
"type": "boolean",
3937+
"format": "",
3938+
},
3939+
"filterRisksIsPubliclyAccessible": {
3940+
"type": "boolean",
3941+
"format": "",
3942+
},
3943+
"filterRisksHasPrivilegedAccess": {
3944+
"type": "boolean",
3945+
"format": "",
3946+
},
3947+
"filterRisksHasAccessToSensitiveData": {
3948+
"type": "boolean",
3949+
"format": "",
3950+
},
3951+
"filterEnvironments": {
3952+
"type": "string",
3953+
"format": "",
3954+
},
3955+
"filterTeams": {
3956+
"type": "string",
3957+
"format": "",
3958+
},
3959+
"filterArch": {
3960+
"type": "string",
3961+
"format": "",
3962+
},
3963+
"filterOperatingSystemName": {
3964+
"type": "string",
3965+
"format": "",
3966+
},
3967+
"filterOperatingSystemVersion": {
3968+
"type": "string",
3969+
"format": "",
3970+
},
3971+
"operationResponseType": "ListVulnerableAssetsResponse",
3972+
},
39693973
"v2.ListSecurityFilters": {
39703974
"operationResponseType": "SecurityFiltersResponse",
39713975
},

features/v2/security_monitoring.feature

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -924,32 +924,39 @@ Feature: Security Monitoring
924924
Then the response status is 200 The list of notification rules.
925925

926926
@generated @skip @team:DataDog/asm-vm
927-
Scenario: List assets SBOMs returns "Bad request: The server cannot process the request due to invalid syntax in the request." response
928-
Given operation "ListAssetsSBOMs" enabled
929-
And new "ListAssetsSBOMs" request
927+
Scenario: List SBOMs returns "Bad request: The server cannot process the request due to invalid syntax in the request." response
928+
Given operation "ListSBOMs" enabled
929+
And new "ListSBOMs" request
930930
When the request is sent
931931
Then the response status is 400 Bad request: The server cannot process the request due to invalid syntax in the request.
932932

933+
@generated @skip @team:DataDog/asm-vm
934+
Scenario: List SBOMs returns "Not found: asset not found" response
935+
Given operation "ListSBOMs" enabled
936+
And new "ListSBOMs" request
937+
When the request is sent
938+
Then the response status is 404 Not found: asset not found
939+
940+
@generated @skip @team:DataDog/asm-vm
941+
Scenario: List SBOMs returns "OK" response
942+
Given operation "ListSBOMs" enabled
943+
And new "ListSBOMs" request
944+
When the request is sent
945+
Then the response status is 200 OK
946+
933947
@team:DataDog/asm-vm
934948
Scenario: List assets SBOMs returns "Not found: There is no request associated with the provided token." response
935-
Given operation "ListAssetsSBOMs" enabled
936-
And new "ListAssetsSBOMs" request
949+
Given operation "ListSBOMs" enabled
950+
And new "ListSBOMs" request
937951
And request contains "page[token]" parameter with value "unknown"
938952
And request contains "page[number]" parameter with value 1
939953
When the request is sent
940954
Then the response status is 404 Not found: There is no request associated with the provided token.
941955

942-
@generated @skip @team:DataDog/asm-vm
943-
Scenario: List assets SBOMs returns "Not found: asset not found" response
944-
Given operation "ListAssetsSBOMs" enabled
945-
And new "ListAssetsSBOMs" request
946-
When the request is sent
947-
Then the response status is 404 Not found: asset not found
948-
949956
@team:DataDog/asm-vm
950957
Scenario: List assets SBOMs returns "OK" response
951-
Given operation "ListAssetsSBOMs" enabled
952-
And new "ListAssetsSBOMs" request
958+
Given operation "ListSBOMs" enabled
959+
And new "ListSBOMs" request
953960
And request contains "filter[package_name]" parameter with value "pandas"
954961
And request contains "filter[asset_type]" parameter with value "Service"
955962
When the request is sent

features/v2/undo.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,19 +3180,13 @@
31803180
"type": "idempotent"
31813181
}
31823182
},
3183-
"ListVulnerableAssets": {
3184-
"tag": "Security Monitoring",
3185-
"undo": {
3186-
"type": "safe"
3187-
}
3188-
},
31893183
"DownloadCloudWorkloadPolicyFile": {
31903184
"tag": "CSM Threats",
31913185
"undo": {
31923186
"type": "safe"
31933187
}
31943188
},
3195-
"ListAssetsSBOMs": {
3189+
"ListSBOMs": {
31963190
"tag": "Security Monitoring",
31973191
"undo": {
31983192
"type": "safe"
@@ -3284,6 +3278,12 @@
32843278
"type": "idempotent"
32853279
}
32863280
},
3281+
"ListVulnerableAssets": {
3282+
"tag": "Security Monitoring",
3283+
"undo": {
3284+
"type": "safe"
3285+
}
3286+
},
32873287
"ListCloudWorkloadSecurityAgentRules": {
32883288
"tag": "CSM Threats",
32893289
"undo": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ export function createConfiguration(
236236
"v2.getSBOM": false,
237237
"v2.getSecurityMonitoringHistsignal": false,
238238
"v2.getSecurityMonitoringHistsignalsByJobId": false,
239-
"v2.listAssetsSBOMs": false,
240239
"v2.listFindings": false,
241240
"v2.listHistoricalJobs": false,
241+
"v2.listSBOMs": false,
242242
"v2.listSecurityMonitoringHistsignals": false,
243243
"v2.listVulnerabilities": false,
244244
"v2.listVulnerableAssets": false,

0 commit comments

Comments
 (0)