Skip to content

Commit 5282888

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 497f78f of spec repo (#3065)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 76a9106 commit 5282888

File tree

10 files changed

+236
-11
lines changed

10 files changed

+236
-11
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,9 +3448,10 @@ components:
34483448
$ref: '#/components/schemas/WidgetCustomLink'
34493449
type: array
34503450
requests:
3451-
description: 'Array of one request object to display in the widget. The
3452-
request must contain a `group-by` tag whose value is a country ISO code.
3453-
3451+
description: 'Array of request objects to display in the widget. May include
3452+
an optional request for the region layer and/or an optional request for
3453+
the points layer. Region layer requests must contain a `group-by` tag
3454+
whose value is a country ISO code.
34543455

34553456
See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)
34563457

@@ -3461,7 +3462,7 @@ components:
34613462
query: <METRIC_1>{<SCOPE_1>}
34623463
items:
34633464
$ref: '#/components/schemas/GeomapWidgetRequest'
3464-
maxItems: 1
3465+
maxItems: 2
34653466
minItems: 1
34663467
type: array
34673468
style:
@@ -3519,8 +3520,9 @@ components:
35193520
focus: WORLD
35203521
properties:
35213522
focus:
3522-
description: The 2-letter ISO code of a country to focus the map on. Or
3523-
`WORLD`.
3523+
description: The 2-letter ISO code of a country to focus the map on, or
3524+
`WORLD` for global view, or a region (`EMEA`, `APAC`, `LATAM`), or a continent
3525+
(`NORTH_AMERICA`, `SOUTH_AMERICA`, `EUROPE`, `AFRICA`, `ASIA`, `OCEANIA`).
35243526
example: WORLD
35253527
type: string
35263528
required:
@@ -3539,6 +3541,12 @@ components:
35393541
items:
35403542
$ref: '#/components/schemas/ListStreamColumn'
35413543
type: array
3544+
conditional_formats:
3545+
description: Threshold (numeric) conditional formatting rules may be used
3546+
by a regions layer.
3547+
items:
3548+
$ref: '#/components/schemas/WidgetConditionalFormat'
3549+
type: array
35423550
formulas:
35433551
description: List of formulas that operate on queries.
35443552
items:
@@ -3564,6 +3572,23 @@ components:
35643572
$ref: '#/components/schemas/LogQueryDefinition'
35653573
sort:
35663574
$ref: '#/components/schemas/WidgetSortBy'
3575+
style:
3576+
$ref: '#/components/schemas/GeomapWidgetRequestStyle'
3577+
text_formats:
3578+
description: Text formatting rules may be used by a points layer.
3579+
items:
3580+
$ref: '#/components/schemas/TableWidgetTextFormatRule'
3581+
type: array
3582+
type: object
3583+
GeomapWidgetRequestStyle:
3584+
description: The style to apply to the request for points layer.
3585+
example:
3586+
color_by: status
3587+
properties:
3588+
color_by:
3589+
description: The category to color the points by.
3590+
example: status
3591+
type: string
35673592
type: object
35683593
GraphSnapshot:
35693594
description: Object representing a graph snapshot.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-12-08T10:46:15.353Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a geomap widget with conditional formats and text formats",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "d20ad35b9db2e5d7ed599e12c501ec3d",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 1403,
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": 560,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"layout_type\":\"ordered\",\"notify_list\":[],\"reflow_type\":\"fixed\",\"tags\":[],\"template_variables\":[],\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 1736,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1736,
45+
"text": "{\"id\":\"n2i-h6d-x6a\",\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"author_handle\":\"[email protected]\",\"author_name\":\"Shishi Liu\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/n2i-h6d-x6a/test-createageomapwidgetwithconditionalformatsandtextformats-1765190775\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0},\"id\":4916490421180340}],\"notify_list\":[],\"created_at\":\"2025-12-08T10:46:15.791396+00:00\",\"modified_at\":\"2025-12-08T10:46:15.791396+00:00\",\"reflow_type\":\"fixed\",\"tags\":[],\"restricted_roles\":[]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 381,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-12-08T10:46:15.368Z",
61+
"time": 540
62+
},
63+
{
64+
"_id": "47b9d68833554d5352921b2bc1461606",
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/n2i-h6d-x6a"
82+
},
83+
"response": {
84+
"bodySize": 38,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 38,
88+
"text": "{\"deleted_dashboard_id\":\"n2i-h6d-x6a\"}"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 379,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2025-12-08T10:46:15.943Z",
104+
"time": 640
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}

features/v1/dashboards.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,22 @@ Feature: Dashboards
7272
And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list"
7373
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_stream"
7474

75+
@team:DataDog/dashboards-backend
76+
Scenario: Create a geomap widget with conditional formats and text formats
77+
Given new "CreateDashboard" request
78+
And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]}
79+
When the request is sent
80+
Then the response status is 200 OK
81+
And the response "widgets[0].definition.type" is equal to "geomap"
82+
And the response "widgets[0].definition.title" is equal to "Log Count by Service and Source"
83+
And the response "widgets[0].definition.requests[0].conditional_formats[0].comparator" is equal to ">"
84+
And the response "widgets[0].definition.requests[0].conditional_formats[0].palette" is equal to "white_on_green"
85+
And the response "widgets[0].definition.requests[0].conditional_formats[0].value" is equal to 1000
86+
And the response "widgets[0].definition.requests[1].text_formats[0].match.type" is equal to "is"
87+
And the response "widgets[0].definition.requests[1].text_formats[0].match.value" is equal to "error"
88+
And the response "widgets[0].definition.requests[1].text_formats[0].palette" is equal to "white_on_red"
89+
And the response "widgets[0].definition.view.focus" is equal to "NORTH_AMERICA"
90+
7591
@generated @skip @team:DataDog/dashboards-backend
7692
Scenario: Create a new dashboard returns "Bad Request" response
7793
Given new "CreateDashboard" request

services/dashboards/src/v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export { GeomapWidgetDefinitionStyle } from "./models/GeomapWidgetDefinitionStyl
103103
export { GeomapWidgetDefinitionType } from "./models/GeomapWidgetDefinitionType";
104104
export { GeomapWidgetDefinitionView } from "./models/GeomapWidgetDefinitionView";
105105
export { GeomapWidgetRequest } from "./models/GeomapWidgetRequest";
106+
export { GeomapWidgetRequestStyle } from "./models/GeomapWidgetRequestStyle";
106107
export { GroupType } from "./models/GroupType";
107108
export { GroupWidgetDefinition } from "./models/GroupWidgetDefinition";
108109
export { GroupWidgetDefinitionType } from "./models/GroupWidgetDefinitionType";

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ export class GeomapWidgetDefinition {
1717
*/
1818
"customLinks"?: Array<WidgetCustomLink>;
1919
/**
20-
* Array of one request object to display in the widget. The request must contain a `group-by` tag whose value is a country ISO code.
21-
*
20+
* Array of request objects to display in the widget. May include an optional request for the region layer and/or an optional request for the points layer. Region layer requests must contain a `group-by` tag whose value is a country ISO code.
2221
* See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)
2322
* for information about building the `REQUEST_SCHEMA`.
2423
*/
25-
"requests": [GeomapWidgetRequest];
24+
"requests": Array<GeomapWidgetRequest>;
2625
/**
2726
* The style to apply to the widget.
2827
*/
@@ -72,7 +71,7 @@ export class GeomapWidgetDefinition {
7271
},
7372
requests: {
7473
baseName: "requests",
75-
type: "[GeomapWidgetRequest]",
74+
type: "Array<GeomapWidgetRequest>",
7675
required: true,
7776
},
7877
style: {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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+
* The 2-letter ISO code of a country to focus the map on, or `WORLD` for global view, or a region (`EMEA`, `APAC`, `LATAM`), or a continent (`NORTH_AMERICA`, `SOUTH_AMERICA`, `EUROPE`, `AFRICA`, `ASIA`, `OCEANIA`).
99
*/
1010
"focus": string;
1111
/**

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

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

33
import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefinition";
44
import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat";
5+
import { GeomapWidgetRequestStyle } from "./GeomapWidgetRequestStyle";
56
import { ListStreamColumn } from "./ListStreamColumn";
67
import { ListStreamQuery } from "./ListStreamQuery";
78
import { LogQueryDefinition } from "./LogQueryDefinition";
9+
import { TableWidgetTextFormatRule } from "./TableWidgetTextFormatRule";
10+
import { WidgetConditionalFormat } from "./WidgetConditionalFormat";
811
import { WidgetFormula } from "./WidgetFormula";
912
import { WidgetSortBy } from "./WidgetSortBy";
1013

@@ -16,6 +19,10 @@ export class GeomapWidgetRequest {
1619
* Widget columns.
1720
*/
1821
"columns"?: Array<ListStreamColumn>;
22+
/**
23+
* Threshold (numeric) conditional formatting rules may be used by a regions layer.
24+
*/
25+
"conditionalFormats"?: Array<WidgetConditionalFormat>;
1926
/**
2027
* List of formulas that operate on queries.
2128
*/
@@ -52,6 +59,14 @@ export class GeomapWidgetRequest {
5259
* The controls for sorting the widget.
5360
*/
5461
"sort"?: WidgetSortBy;
62+
/**
63+
* The style to apply to the request for points layer.
64+
*/
65+
"style"?: GeomapWidgetRequestStyle;
66+
/**
67+
* Text formatting rules may be used by a points layer.
68+
*/
69+
"textFormats"?: Array<TableWidgetTextFormatRule>;
5570
/**
5671
* A container for additional, undeclared properties.
5772
* This is a holder for any undeclared properties as specified with
@@ -71,6 +86,10 @@ export class GeomapWidgetRequest {
7186
baseName: "columns",
7287
type: "Array<ListStreamColumn>",
7388
},
89+
conditionalFormats: {
90+
baseName: "conditional_formats",
91+
type: "Array<WidgetConditionalFormat>",
92+
},
7493
formulas: {
7594
baseName: "formulas",
7695
type: "Array<WidgetFormula>",
@@ -107,6 +126,14 @@ export class GeomapWidgetRequest {
107126
baseName: "sort",
108127
type: "WidgetSortBy",
109128
},
129+
style: {
130+
baseName: "style",
131+
type: "GeomapWidgetRequestStyle",
132+
},
133+
textFormats: {
134+
baseName: "text_formats",
135+
type: "Array<TableWidgetTextFormatRule>",
136+
},
110137
additionalProperties: {
111138
baseName: "additionalProperties",
112139
type: "{ [key: string]: any; }",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* The style to apply to the request for points layer.
5+
*/
6+
export class GeomapWidgetRequestStyle {
7+
/**
8+
* The category to color the points by.
9+
*/
10+
"colorBy"?: string;
11+
/**
12+
* A container for additional, undeclared properties.
13+
* This is a holder for any undeclared properties as specified with
14+
* the 'additionalProperties' keyword in the OAS document.
15+
*/
16+
"additionalProperties"?: { [key: string]: any };
17+
/**
18+
* @ignore
19+
*/
20+
"_unparsed"?: boolean;
21+
22+
/**
23+
* @ignore
24+
*/
25+
static readonly attributeTypeMap: AttributeTypeMap = {
26+
colorBy: {
27+
baseName: "color_by",
28+
type: "string",
29+
},
30+
additionalProperties: {
31+
baseName: "additionalProperties",
32+
type: "{ [key: string]: any; }",
33+
},
34+
};
35+
36+
/**
37+
* @ignore
38+
*/
39+
static getAttributeTypeMap(): AttributeTypeMap {
40+
return GeomapWidgetRequestStyle.attributeTypeMap;
41+
}
42+
43+
public constructor() {}
44+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { GeomapWidgetDefinition } from "./GeomapWidgetDefinition";
4747
import { GeomapWidgetDefinitionStyle } from "./GeomapWidgetDefinitionStyle";
4848
import { GeomapWidgetDefinitionView } from "./GeomapWidgetDefinitionView";
4949
import { GeomapWidgetRequest } from "./GeomapWidgetRequest";
50+
import { GeomapWidgetRequestStyle } from "./GeomapWidgetRequestStyle";
5051
import { GroupWidgetDefinition } from "./GroupWidgetDefinition";
5152
import { HeatMapWidgetDefinition } from "./HeatMapWidgetDefinition";
5253
import { HeatMapWidgetRequest } from "./HeatMapWidgetRequest";
@@ -637,6 +638,7 @@ export const TypingInfo: ModelTypingInfo = {
637638
GeomapWidgetDefinitionStyle: GeomapWidgetDefinitionStyle,
638639
GeomapWidgetDefinitionView: GeomapWidgetDefinitionView,
639640
GeomapWidgetRequest: GeomapWidgetRequest,
641+
GeomapWidgetRequestStyle: GeomapWidgetRequestStyle,
640642
GroupWidgetDefinition: GroupWidgetDefinition,
641643
HeatMapWidgetDefinition: HeatMapWidgetDefinition,
642644
HeatMapWidgetRequest: HeatMapWidgetRequest,

0 commit comments

Comments
 (0)