Skip to content

Commit c0eeae6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Make sure required params are first (#2675)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e57d6bf commit c0eeae6

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "4413e63",
3-
"generated": "2025-08-19 20:28:35.046"
2+
"spec_repo_commit": "d58cb84",
3+
"generated": "2025-08-22 18:44:56.345"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67451,14 +67451,6 @@ paths:
6745167451
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
6745267452
operationId: GetHistoricalCostByOrg
6745367453
parameters:
67454-
- description: String to specify whether cost is broken down at a parent-org
67455-
level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults
67456-
to `summary`.
67457-
in: query
67458-
name: view
67459-
required: false
67460-
schema:
67461-
type: string
6746267454
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
6746367455
for cost beginning this month.'
6746467456
in: query
@@ -67467,6 +67459,14 @@ paths:
6746767459
schema:
6746867460
format: date-time
6746967461
type: string
67462+
- description: String to specify whether cost is broken down at a parent-org
67463+
level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults
67464+
to `summary`.
67465+
in: query
67466+
name: view
67467+
required: false
67468+
schema:
67469+
type: string
6747067470
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
6747167471
for cost ending this month.'
6747267472
in: query

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4427,14 +4427,14 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
44274427
operationResponseType: "CostByOrgResponse",
44284428
},
44294429
"UsageMeteringApi.V2.GetHistoricalCostByOrg": {
4430-
view: {
4431-
type: "string",
4432-
format: "",
4433-
},
44344430
startMonth: {
44354431
type: "Date",
44364432
format: "date-time",
44374433
},
4434+
view: {
4435+
type: "string",
4436+
format: "",
4437+
},
44384438
endMonth: {
44394439
type: "Date",
44404440
format: "date-time",

services/usage_metering/src/v2/UsageMeteringApi.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,17 +330,17 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
330330
}
331331

332332
// Query Params
333-
if (view !== undefined) {
333+
if (startMonth !== undefined) {
334334
requestContext.setQueryParam(
335-
"view",
336-
serialize(view, TypingInfo, "string", ""),
335+
"start_month",
336+
serialize(startMonth, TypingInfo, "Date", "date-time"),
337337
"",
338338
);
339339
}
340-
if (startMonth !== undefined) {
340+
if (view !== undefined) {
341341
requestContext.setQueryParam(
342-
"start_month",
343-
serialize(startMonth, TypingInfo, "Date", "date-time"),
342+
"view",
343+
serialize(view, TypingInfo, "string", ""),
344344
"",
345345
);
346346
}

0 commit comments

Comments
 (0)