Skip to content

Commit 17a692a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 095be0d of spec repo
1 parent fe484d2 commit 17a692a

File tree

7 files changed

+241
-10
lines changed

7 files changed

+241
-10
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": "8001cbb",
3-
"generated": "2025-08-13 20:27:09.207"
2+
"spec_repo_commit": "095be0d",
3+
"generated": "2025-08-13 22:40:11.170"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,14 +3445,33 @@ components:
34453445
description: The view of the world that the map should render.
34463446
example:
34473447
focus: WORLD
3448-
properties:
3448+
oneOf:
3449+
- required:
3450+
- focus
3451+
- required:
3452+
- custom_extent
3453+
properties:
3454+
custom_extent:
3455+
description: A custom extent of the map defined by an array of four numbers
3456+
in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
3457+
example:
3458+
- -30
3459+
- -40
3460+
- 40
3461+
- 30
3462+
items:
3463+
description: The longitudinal or latitudinal coordinates of the bounding
3464+
box.
3465+
format: double
3466+
type: number
3467+
maxItems: 4
3468+
minItems: 4
3469+
type: array
34493470
focus:
3450-
description: The 2-letter ISO code of a country to focus the map on. Or
3451-
`WORLD`.
3471+
description: The ISO code of a country, subdivision, or region to focus
3472+
the map on. Or `WORLD`. Mutually exclusive with `custom_extent`.
34523473
example: WORLD
34533474
type: string
3454-
required:
3455-
- focus
34563475
type: object
34573476
GeomapWidgetRequest:
34583477
description: An updated geomap widget.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-13T22:21:29.993Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with geomap widget in custom focus",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "6b17b4af82cf16ce8c4a879dbc8a1863",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 796,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 559,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"description\":null,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_geomap_widget_in_custom_focus-1755123689\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[{\"facet\":\"@geo.country_iso_code\",\"limit\":250,\"sort\":{\"aggregation\":\"count\",\"order\":\"desc\"}}],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"geomap\",\"view\":{\"custom_extent\":[-30,-40,40,30]}},\"layout\":{\"height\":30,\"width\":47,\"x\":0,\"y\":0}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 1111,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1111,
45+
"text": "{\"id\":\"ift-hah-kbn\",\"title\":\"Test-Create_a_new_dashboard_with_geomap_widget_in_custom_focus-1755123689\",\"description\":null,\"author_handle\":\"[email protected]\",\"author_name\":\"frog\",\"layout_type\":\"free\",\"url\":\"/dashboard/ift-hah-kbn/test-createanewdashboardwithgeomapwidgetincustomfocus-1755123689\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[{\"facet\":\"@geo.country_iso_code\",\"limit\":250,\"sort\":{\"aggregation\":\"count\",\"order\":\"desc\"}}],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"geomap\",\"view\":{\"custom_extent\":[-30,-40,40,30]}},\"layout\":{\"height\":30,\"width\":47,\"x\":0,\"y\":0},\"id\":7638192239577908}],\"notify_list\":[],\"created_at\":\"2025-08-13T22:21:30.205019+00:00\",\"modified_at\":\"2025-08-13T22:21:30.205019+00:00\",\"restricted_roles\":[]}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 689,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-08-13T22:21:29.996Z",
61+
"time": 287
62+
},
63+
{
64+
"_id": "0a9f5ca2ea43d1dd545ba37fce11ce6a",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 520,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/ift-hah-kbn"
82+
},
83+
"response": {
84+
"bodySize": 39,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 39,
88+
"text": "{\"deleted_dashboard_id\":\"ift-hah-kbn\"}\n"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 687,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2025-08-13T22:21:30.290Z",
104+
"time": 205
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}

features/v1/dashboards.feature

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,17 @@ Feature: Dashboards
422422
And the response "widgets[0].definition.requests[0].sort.order_by[0].type" is equal to "formula"
423423
And the response "widgets[0].definition.requests[0].sort.order_by[0].index" is equal to 0
424424

425+
@team:DataDog/dashboards-backend
426+
Scenario: Create a new dashboard with geomap widget in custom focus
427+
Given new "CreateDashboard" request
428+
And body from file "dashboards_json_payload/geomap_widget_in_custom_focus.json"
429+
When the request is sent
430+
Then the response status is 200 OK
431+
And the response "widgets[0].definition.type" is equal to "geomap"
432+
And the response "widgets[0].definition.requests[0].sort.order_by[0].order" is equal to "desc"
433+
And the response "widgets[0].definition.requests[0].sort.order_by[0].type" is equal to "formula"
434+
And the response "widgets[0].definition.requests[0].sort.order_by[0].index" is equal to 0
435+
425436
@team:DataDog/dashboards-backend
426437
Scenario: Create a new dashboard with heatmap widget
427438
Given new "CreateDashboard" request
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"title":"{{ unique }}",
3+
"description":null,
4+
"widgets":[
5+
{
6+
"layout":{
7+
"x":0,
8+
"y":0,
9+
"width":47,
10+
"height":30
11+
},
12+
"definition":{
13+
"title":"",
14+
"title_size":"16",
15+
"title_align":"left",
16+
"time":{
17+
18+
},
19+
"type":"geomap",
20+
"requests":[
21+
{
22+
"formulas":[
23+
{
24+
"formula":"query1"
25+
}
26+
],
27+
"queries":[
28+
{
29+
"name":"query1",
30+
"data_source":"rum",
31+
"search":{
32+
"query":""
33+
},
34+
"indexes":[
35+
"*"
36+
],
37+
"compute":{
38+
"aggregation":"count"
39+
},
40+
"group_by":[
41+
{
42+
"facet":"@geo.country_iso_code",
43+
"limit":250,
44+
"sort":{
45+
"order":"desc",
46+
"aggregation":"count"
47+
}
48+
}
49+
]
50+
}
51+
],
52+
"sort": {
53+
"count":250,
54+
"order_by":[
55+
{
56+
"type":"formula",
57+
"index":0,
58+
"order":"desc"
59+
}
60+
]
61+
},
62+
"response_format":"scalar"
63+
}
64+
],
65+
"style":{
66+
"palette":"hostmap_blues",
67+
"palette_flip":false
68+
},
69+
"view":{
70+
"custom_extent":[-30, -40, 40, 30]
71+
}
72+
}
73+
}
74+
],
75+
"template_variables":[
76+
77+
],
78+
"layout_type":"free",
79+
"notify_list":[
80+
81+
]
82+
}

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";
55
*/
66
export class GeomapWidgetDefinitionView {
77
/**
8-
* The 2-letter ISO code of a country to focus the map on. Or `WORLD`.
8+
* A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
99
*/
10-
"focus": string;
10+
"customExtent"?: [number, number, number, number];
11+
/**
12+
* The ISO code of a country, subdivision, or region to focus the map on. Or `WORLD`. Mutually exclusive with `custom_extent`.
13+
*/
14+
"focus"?: string;
1115
/**
1216
* A container for additional, undeclared properties.
1317
* This is a holder for any undeclared properties as specified with
@@ -23,10 +27,14 @@ export class GeomapWidgetDefinitionView {
2327
* @ignore
2428
*/
2529
static readonly attributeTypeMap: AttributeTypeMap = {
30+
customExtent: {
31+
baseName: "custom_extent",
32+
type: "[number, number, number, number]",
33+
format: "double",
34+
},
2635
focus: {
2736
baseName: "focus",
2837
type: "string",
29-
required: true,
3038
},
3139
additionalProperties: {
3240
baseName: "additionalProperties",

0 commit comments

Comments
 (0)