Skip to content

Commit 2ddab8f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8d4caac of spec repo
1 parent f2c9c20 commit 2ddab8f

File tree

6 files changed

+116
-3
lines changed

6 files changed

+116
-3
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,13 @@ components:
13141314
description: A role UUID.
13151315
type: string
13161316
type: array
1317+
tabs:
1318+
description: List of tabs for organizing dashboard widgets into groups.
1319+
items:
1320+
$ref: "#/components/schemas/DashboardTab"
1321+
maxItems: 100
1322+
nullable: true
1323+
type: array
13171324
tags:
13181325
description: List of team names representing ownership of a dashboard.
13191326
items:
@@ -1584,6 +1591,35 @@ components:
15841591
description: URL of the dashboard.
15851592
type: string
15861593
type: object
1594+
DashboardTab:
1595+
description: Dashboard tab for organizing widgets.
1596+
properties:
1597+
id:
1598+
description: UUID of the tab.
1599+
example: ""
1600+
format: uuid
1601+
type: string
1602+
name:
1603+
description: Name of the tab.
1604+
example: L
1605+
maxLength: 100
1606+
minLength: 1
1607+
type: string
1608+
widget_ids:
1609+
description: >-
1610+
List of widget IDs belonging to this tab. The backend also accepts positional references in @N format (1-indexed) as a convenience for Terraform and other declarative tools.
1611+
example:
1612+
- 0
1613+
items:
1614+
description: Widget ID.
1615+
format: int64
1616+
type: integer
1617+
type: array
1618+
required:
1619+
- id
1620+
- name
1621+
- widget_ids
1622+
type: object
15871623
DashboardTemplateVariable:
15881624
description: Template variable.
15891625
properties:

features/v1/dashboards.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Feature: Dashboards
9090
@generated @skip @team:DataDog/dashboards-backend
9191
Scenario: Create a new dashboard returns "Bad Request" response
9292
Given new "CreateDashboard" request
93-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
93+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
9494
When the request is sent
9595
Then the response status is 400 Bad Request
9696

@@ -1373,15 +1373,15 @@ Feature: Dashboards
13731373
Scenario: Update a dashboard returns "Bad Request" response
13741374
Given new "UpdateDashboard" request
13751375
And request contains "dashboard_id" parameter from "REPLACE.ME"
1376-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
1376+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
13771377
When the request is sent
13781378
Then the response status is 400 Bad Request
13791379

13801380
@generated @skip @team:DataDog/dashboards-backend
13811381
Scenario: Update a dashboard returns "Item Not Found" response
13821382
Given new "UpdateDashboard" request
13831383
And request contains "dashboard_id" parameter from "REPLACE.ME"
1384-
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
1384+
And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]}
13851385
When the request is sent
13861386
Then the response status is 404 Item Not Found
13871387

services/dashboards/src/v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export { DashboardRestoreRequest } from "./models/DashboardRestoreRequest";
5454
export { DashboardShareType } from "./models/DashboardShareType";
5555
export { DashboardSummary } from "./models/DashboardSummary";
5656
export { DashboardSummaryDefinition } from "./models/DashboardSummaryDefinition";
57+
export { DashboardTab } from "./models/DashboardTab";
5758
export { DashboardTemplateVariable } from "./models/DashboardTemplateVariable";
5859
export { DashboardTemplateVariablePreset } from "./models/DashboardTemplateVariablePreset";
5960
export { DashboardTemplateVariablePresetValue } from "./models/DashboardTemplateVariablePresetValue";

services/dashboards/src/v1/models/Dashboard.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

33
import { DashboardLayoutType } from "./DashboardLayoutType";
44
import { DashboardReflowType } from "./DashboardReflowType";
5+
import { DashboardTab } from "./DashboardTab";
56
import { DashboardTemplateVariable } from "./DashboardTemplateVariable";
67
import { DashboardTemplateVariablePreset } from "./DashboardTemplateVariablePreset";
78
import { Widget } from "./Widget";
@@ -59,6 +60,10 @@ export class Dashboard {
5960
* A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard.
6061
*/
6162
"restrictedRoles"?: Array<string>;
63+
/**
64+
* List of tabs for organizing dashboard widgets into groups.
65+
*/
66+
"tabs"?: Array<DashboardTab>;
6267
/**
6368
* List of team names representing ownership of a dashboard.
6469
*/
@@ -145,6 +150,10 @@ export class Dashboard {
145150
baseName: "restricted_roles",
146151
type: "Array<string>",
147152
},
153+
tabs: {
154+
baseName: "tabs",
155+
type: "Array<DashboardTab>",
156+
},
148157
tags: {
149158
baseName: "tags",
150159
type: "Array<string>",
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Dashboard tab for organizing widgets.
5+
*/
6+
export class DashboardTab {
7+
/**
8+
* UUID of the tab.
9+
*/
10+
"id": string;
11+
/**
12+
* Name of the tab.
13+
*/
14+
"name": string;
15+
/**
16+
* List of widget IDs belonging to this tab. The backend also accepts positional references in @N format (1-indexed) as a convenience for Terraform and other declarative tools.
17+
*/
18+
"widgetIds": Array<number>;
19+
/**
20+
* A container for additional, undeclared properties.
21+
* This is a holder for any undeclared properties as specified with
22+
* the 'additionalProperties' keyword in the OAS document.
23+
*/
24+
"additionalProperties"?: { [key: string]: any };
25+
/**
26+
* @ignore
27+
*/
28+
"_unparsed"?: boolean;
29+
30+
/**
31+
* @ignore
32+
*/
33+
static readonly attributeTypeMap: AttributeTypeMap = {
34+
id: {
35+
baseName: "id",
36+
type: "string",
37+
required: true,
38+
format: "uuid",
39+
},
40+
name: {
41+
baseName: "name",
42+
type: "string",
43+
required: true,
44+
},
45+
widgetIds: {
46+
baseName: "widget_ids",
47+
type: "Array<number>",
48+
required: true,
49+
format: "int64",
50+
},
51+
additionalProperties: {
52+
baseName: "additionalProperties",
53+
type: "{ [key: string]: any; }",
54+
},
55+
};
56+
57+
/**
58+
* @ignore
59+
*/
60+
static getAttributeTypeMap(): AttributeTypeMap {
61+
return DashboardTab.attributeTypeMap;
62+
}
63+
64+
public constructor() {}
65+
}

services/dashboards/src/v1/models/TypingInfo.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { DashboardGlobalTime } from "./DashboardGlobalTime";
2121
import { DashboardRestoreRequest } from "./DashboardRestoreRequest";
2222
import { DashboardSummary } from "./DashboardSummary";
2323
import { DashboardSummaryDefinition } from "./DashboardSummaryDefinition";
24+
import { DashboardTab } from "./DashboardTab";
2425
import { DashboardTemplateVariable } from "./DashboardTemplateVariable";
2526
import { DashboardTemplateVariablePreset } from "./DashboardTemplateVariablePreset";
2627
import { DashboardTemplateVariablePresetValue } from "./DashboardTemplateVariablePresetValue";
@@ -624,6 +625,7 @@ export const TypingInfo: ModelTypingInfo = {
624625
DashboardRestoreRequest: DashboardRestoreRequest,
625626
DashboardSummary: DashboardSummary,
626627
DashboardSummaryDefinition: DashboardSummaryDefinition,
628+
DashboardTab: DashboardTab,
627629
DashboardTemplateVariable: DashboardTemplateVariable,
628630
DashboardTemplateVariablePreset: DashboardTemplateVariablePreset,
629631
DashboardTemplateVariablePresetValue: DashboardTemplateVariablePresetValue,

0 commit comments

Comments
 (0)