Skip to content

Commit b3363c4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix GetBudget endpoint to return BudgetWithEntries instead of BudgetValidationRequest (#3350)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 35c9235 commit b3363c4

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71515,7 +71515,7 @@ paths:
7151571515
content:
7151671516
application/json:
7151771517
schema:
71518-
$ref: '#/components/schemas/BudgetValidationRequest'
71518+
$ref: '#/components/schemas/BudgetWithEntries'
7151971519
description: OK
7152071520
'429':
7152171521
$ref: '#/components/responses/TooManyRequestsResponse'

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5047,7 +5047,7 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
50475047
type: "string",
50485048
format: "",
50495049
},
5050-
operationResponseType: "BudgetValidationRequest",
5050+
operationResponseType: "BudgetWithEntries",
50515051
},
50525052
"CloudCostManagementApi.V2.DeleteBudget": {
50535053
budgetId: {

services/cloud_cost_management/src/v2/CloudCostManagementApi.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,14 +2506,14 @@ export class CloudCostManagementApiResponseProcessor {
25062506
*/
25072507
public async getBudget(
25082508
response: ResponseContext,
2509-
): Promise<BudgetValidationRequest> {
2509+
): Promise<BudgetWithEntries> {
25102510
const contentType = normalizeMediaType(response.headers["content-type"]);
25112511
if (response.httpStatusCode === 200) {
2512-
const body: BudgetValidationRequest = deserialize(
2512+
const body: BudgetWithEntries = deserialize(
25132513
parse(await response.body.text(), contentType),
25142514
TypingInfo,
2515-
"BudgetValidationRequest",
2516-
) as BudgetValidationRequest;
2515+
"BudgetWithEntries",
2516+
) as BudgetWithEntries;
25172517
return body;
25182518
}
25192519
if (response.httpStatusCode === 429) {
@@ -2537,12 +2537,12 @@ export class CloudCostManagementApiResponseProcessor {
25372537

25382538
// Work around for missing responses in specification, e.g. for petstore.yaml
25392539
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2540-
const body: BudgetValidationRequest = deserialize(
2540+
const body: BudgetWithEntries = deserialize(
25412541
parse(await response.body.text(), contentType),
25422542
TypingInfo,
2543-
"BudgetValidationRequest",
2543+
"BudgetWithEntries",
25442544
"",
2545-
) as BudgetValidationRequest;
2545+
) as BudgetWithEntries;
25462546
return body;
25472547
}
25482548

@@ -4534,7 +4534,7 @@ export class CloudCostManagementApi {
45344534
public getBudget(
45354535
param: CloudCostManagementApiGetBudgetRequest,
45364536
options?: Configuration,
4537-
): Promise<BudgetValidationRequest> {
4537+
): Promise<BudgetWithEntries> {
45384538
const requestContextPromise = this.requestFactory.getBudget(
45394539
param.budgetId,
45404540
options,

0 commit comments

Comments
 (0)