Skip to content

Commit f6a976e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3dff532a of spec repo
1 parent a396b73 commit f6a976e

11 files changed

+43
-20
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-09-04 17:12:33.964631",
8-
"spec_repo_commit": "8e0507d2"
7+
"regenerated": "2024-09-06 21:00:07.165498",
8+
"spec_repo_commit": "3dff532a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-04 17:12:33.982704",
13-
"spec_repo_commit": "8e0507d2"
12+
"regenerated": "2024-09-06 21:00:07.183393",
13+
"spec_repo_commit": "3dff532a"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17115,6 +17115,9 @@ components:
1711517115
properties:
1711617116
display:
1711717117
$ref: '#/components/schemas/ToplistWidgetDisplay'
17118+
palette:
17119+
description: Color palette to apply to the widget.
17120+
type: string
1711817121
scaling:
1711917122
$ref: '#/components/schemas/ToplistWidgetScaling'
1712017123
type: object

examples/v1_dashboards_CreateDashboard_1213075383.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ async fn main() {
9191
),
9292
),
9393
)
94+
.palette("dog_classic".to_string())
9495
.scaling(ToplistWidgetScaling::RELATIVE),
9596
)
9697
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))

examples/v1_dashboards_CreateDashboard_2563642929.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ async fn main() {
9191
),
9292
),
9393
)
94+
.palette("dog_classic".to_string())
9495
.scaling(ToplistWidgetScaling::RELATIVE),
9596
)
9697
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))

src/datadogV1/model/model_toplist_widget_style.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct ToplistWidgetStyle {
1414
/// Top list widget display options.
1515
#[serde(rename = "display")]
1616
pub display: Option<crate::datadogV1::model::ToplistWidgetDisplay>,
17+
/// Color palette to apply to the widget.
18+
#[serde(rename = "palette")]
19+
pub palette: Option<String>,
1720
/// Top list widget scaling definition.
1821
#[serde(rename = "scaling")]
1922
pub scaling: Option<crate::datadogV1::model::ToplistWidgetScaling>,
@@ -28,6 +31,7 @@ impl ToplistWidgetStyle {
2831
pub fn new() -> ToplistWidgetStyle {
2932
ToplistWidgetStyle {
3033
display: None,
34+
palette: None,
3135
scaling: None,
3236
additional_properties: std::collections::BTreeMap::new(),
3337
_unparsed: false,
@@ -39,6 +43,11 @@ impl ToplistWidgetStyle {
3943
self
4044
}
4145

46+
pub fn palette(mut self, value: String) -> Self {
47+
self.palette = Some(value);
48+
self
49+
}
50+
4251
pub fn scaling(mut self, value: crate::datadogV1::model::ToplistWidgetScaling) -> Self {
4352
self.scaling = Some(value);
4453
self
@@ -77,6 +86,7 @@ impl<'de> Deserialize<'de> for ToplistWidgetStyle {
7786
M: MapAccess<'a>,
7887
{
7988
let mut display: Option<crate::datadogV1::model::ToplistWidgetDisplay> = None;
89+
let mut palette: Option<String> = None;
8090
let mut scaling: Option<crate::datadogV1::model::ToplistWidgetScaling> = None;
8191
let mut additional_properties: std::collections::BTreeMap<
8292
String,
@@ -100,6 +110,12 @@ impl<'de> Deserialize<'de> for ToplistWidgetStyle {
100110
}
101111
}
102112
}
113+
"palette" => {
114+
if v.is_null() {
115+
continue;
116+
}
117+
palette = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
118+
}
103119
"scaling" => {
104120
if v.is_null() {
105121
continue;
@@ -124,6 +140,7 @@ impl<'de> Deserialize<'de> for ToplistWidgetStyle {
124140

125141
let content = ToplistWidgetStyle {
126142
display,
143+
palette,
127144
scaling,
128145
additional_properties,
129146
_unparsed,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-21T14:43:42.680Z
1+
2024-09-06T12:10:50.473Z

tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-toplist-widget-sorted-by-group.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_a_toplist_widget_sorted_by_group-1716302622\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}",
6+
"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_a_toplist_widget_sorted_by_group-1725624650\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"id\":\"wbt-nas-fux\",\"title\":\"Test-Create_a_new_dashboard_with_a_toplist_widget_sorted_by_group-1716302622\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/wbt-nas-fux/test-createanewdashboardwithatoplistwidgetsortedbygroup-1716302622\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":4714578700620842}],\"notify_list\":[],\"created_at\":\"2024-05-21T14:43:42.875646+00:00\",\"modified_at\":\"2024-05-21T14:43:42.875646+00:00\",\"restricted_roles\":[]}\n",
22+
"string": "{\"id\":\"pr4-bz7-nn3\",\"title\":\"Test-Create_a_new_dashboard_with_a_toplist_widget_sorted_by_group-1725624650\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/pr4-bz7-nn3/test-createanewdashboardwithatoplistwidgetsortedbygroup-1725624650\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":8644525358047960}],\"notify_list\":[],\"created_at\":\"2024-09-06T12:10:50.735923+00:00\",\"modified_at\":\"2024-09-06T12:10:50.735923+00:00\",\"restricted_roles\":[]}\n",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Tue, 21 May 2024 14:43:42 GMT"
35+
"recorded_at": "Fri, 06 Sep 2024 12:10:50 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,11 +43,11 @@
4343
]
4444
},
4545
"method": "delete",
46-
"uri": "https://api.datadoghq.com/api/v1/dashboard/wbt-nas-fux"
46+
"uri": "https://api.datadoghq.com/api/v1/dashboard/pr4-bz7-nn3"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"deleted_dashboard_id\":\"wbt-nas-fux\"}\n",
50+
"string": "{\"deleted_dashboard_id\":\"pr4-bz7-nn3\"}\n",
5151
"encoding": null
5252
},
5353
"headers": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Tue, 21 May 2024 14:43:42 GMT"
63+
"recorded_at": "Fri, 06 Sep 2024 12:10:50 GMT"
6464
}
6565
],
6666
"recorded_with": "VCR 6.0.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-15T20:07:42.432Z
1+
2024-09-06T12:10:51.099Z

tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1715803662\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}",
6+
"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1725624651\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"id\":\"y3a-6s5-ycw\",\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1715803662\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/y3a-6s5-ycw/test-createanewdashboardwithtoplistwidget-1715803662\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":1848529953140569}],\"notify_list\":[],\"created_at\":\"2024-05-15T20:07:42.589379+00:00\",\"modified_at\":\"2024-05-15T20:07:42.589379+00:00\",\"restricted_roles\":[]}\n",
22+
"string": "{\"id\":\"q25-ie2-8p9\",\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1725624651\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/q25-ie2-8p9/test-createanewdashboardwithtoplistwidget-1725624651\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":6898333964604098}],\"notify_list\":[],\"created_at\":\"2024-09-06T12:10:51.371974+00:00\",\"modified_at\":\"2024-09-06T12:10:51.371974+00:00\",\"restricted_roles\":[]}\n",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Wed, 15 May 2024 20:07:42 GMT"
35+
"recorded_at": "Fri, 06 Sep 2024 12:10:51 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,11 +43,11 @@
4343
]
4444
},
4545
"method": "delete",
46-
"uri": "https://api.datadoghq.com/api/v1/dashboard/y3a-6s5-ycw"
46+
"uri": "https://api.datadoghq.com/api/v1/dashboard/q25-ie2-8p9"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"deleted_dashboard_id\":\"y3a-6s5-ycw\"}\n",
50+
"string": "{\"deleted_dashboard_id\":\"q25-ie2-8p9\"}\n",
5151
"encoding": null
5252
},
5353
"headers": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Wed, 15 May 2024 20:07:42 GMT"
63+
"recorded_at": "Fri, 06 Sep 2024 12:10:51 GMT"
6464
}
6565
],
6666
"recorded_with": "VCR 6.0.0"

tests/scenarios/features/v1/dashboards.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Feature: Dashboards
190190
@team:DataDog/dashboards-backend
191191
Scenario: Create a new dashboard with a toplist widget sorted by group
192192
Given new "CreateDashboard" request
193-
And body with value {"title":"{{ unique }}","description":"","widgets":[{"layout":{"x":0,"y":0,"width":47,"height":15},"definition":{"title":"","title_size":"16","title_align":"left","time":{},"style":{"display": {"type": "stacked","legend": "inline"},"scaling": "relative"},"type":"toplist","requests":[{"queries":[{"data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} by {service}","aggregator":"avg"}],"formulas":[{"formula":"query1"}],"sort":{"count":10,"order_by":[{"type":"group","name":"service","order":"asc"}]},"response_format":"scalar"}]}}],"template_variables":[],"layout_type":"free","is_read_only":false,"notify_list":[]}
193+
And body with value {"title":"{{ unique }}","description":"","widgets":[{"layout":{"x":0,"y":0,"width":47,"height":15},"definition":{"title":"","title_size":"16","title_align":"left","time":{},"style":{"display": {"type": "stacked","legend": "inline"},"scaling": "relative","palette": "dog_classic"},"type":"toplist","requests":[{"queries":[{"data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} by {service}","aggregator":"avg"}],"formulas":[{"formula":"query1"}],"sort":{"count":10,"order_by":[{"type":"group","name":"service","order":"asc"}]},"response_format":"scalar"}]}}],"template_variables":[],"layout_type":"free","is_read_only":false,"notify_list":[]}
194194
When the request is sent
195195
Then the response status is 200 OK
196196
And the response "widgets[0].definition.type" is equal to "toplist"

0 commit comments

Comments
 (0)