Skip to content

Commit d008d32

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3b5f1c0 of spec repo
1 parent 67cd416 commit d008d32

16 files changed

Lines changed: 463 additions & 10 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,11 +1495,12 @@ components:
14951495
nullable: true
14961496
type: array
14971497
tags:
1498-
description: List of team names representing ownership of a dashboard.
1498+
description: Tags associated with the dashboard. Supports up to five team tags and two AI tags.
14991499
items:
1500-
description: The name of a Datadog team of the form `team:<name>`
1500+
description: A tag of the form `team:<name>` or `ai:<value>`.
1501+
pattern: "^(team|ai):.+$"
15011502
type: string
1502-
maxItems: 5
1503+
maxItems: 7
15031504
nullable: true
15041505
type: array
15051506
template_variable_presets:
@@ -1981,7 +1982,7 @@ components:
19811982
dataset_provider:
19821983
$ref: '#/components/schemas/PublishedDatasetProvider'
19831984
filter:
1984-
description: Filter applied to the dataset's rows, using events-style search syntax.
1985+
description: Filter applied to the rows of the dataset, using events-style search syntax.
19851986
example: "service:web-store"
19861987
type: string
19871988
limit:

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31334,11 +31334,12 @@ components:
3133431334
readOnly: true
3133531335
type: integer
3133631336
tags:
31337-
description: List of team names representing ownership of a dashboard.
31337+
description: Tags associated with the dashboard. Supports up to five team tags and two AI tags.
3133831338
items:
31339-
description: The name of a Datadog team, formatted as `team:<name>`
31339+
description: A tag of the form `team:<name>` or `ai:<value>`.
31340+
pattern: "^(team|ai):.+$"
3134031341
type: string
31341-
maxItems: 5
31342+
maxItems: 7
3134231343
nullable: true
3134331344
readOnly: true
3134431345
type: array
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Get a dashboard with five team tags and two AI tags
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v1.api.DashboardsApi;
6+
import com.datadog.api.client.v1.model.Dashboard;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
DashboardsApi apiInstance = new DashboardsApi(defaultClient);
12+
13+
// there is a valid "dashboard_with_team_and_ai_tags" in the system
14+
String DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID = System.getenv("DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID");
15+
16+
try {
17+
Dashboard result = apiInstance.getDashboard(DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID);
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println("Exception when calling DashboardsApi#getDashboard");
21+
System.err.println("Status code: " + e.getCode());
22+
System.err.println("Reason: " + e.getResponseBody());
23+
System.err.println("Response headers: " + e.getResponseHeaders());
24+
e.printStackTrace();
25+
}
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Get dashboard list items with five team tags and two AI tags
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DashboardListsApi;
6+
import com.datadog.api.client.v2.model.DashboardListItems;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
12+
13+
// there is a valid "dashboard_list" in the system
14+
Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));
15+
16+
try {
17+
DashboardListItems result = apiInstance.getDashboardListItems(DASHBOARD_LIST_ID);
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println("Exception when calling DashboardListsApi#getDashboardListItems");
21+
System.err.println("Status code: " + e.getCode());
22+
System.err.println("Reason: " + e.getResponseBody());
23+
System.err.println("Response headers: " + e.getResponseHeaders());
24+
e.printStackTrace();
25+
}
26+
}
27+
}

src/main/java/com/datadog/api/client/v1/model/Dashboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public Dashboard addTagsItem(String tagsItem) {
471471
}
472472

473473
/**
474-
* List of team names representing ownership of a dashboard.
474+
* Tags associated with the dashboard. Supports up to five team tags and two AI tags.
475475
*
476476
* @return tags
477477
*/

src/main/java/com/datadog/api/client/v1/model/DatasetListQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public DatasetListQuery filter(String filter) {
139139
}
140140

141141
/**
142-
* Filter applied to the dataset's rows, using events-style search syntax.
142+
* Filter applied to the rows of the dataset, using events-style search syntax.
143143
*
144144
* @return filter
145145
*/

src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public Integer getPopularity() {
264264
}
265265

266266
/**
267-
* List of team names representing ownership of a dashboard.
267+
* Tags associated with the dashboard. Supports up to five team tags and two AI tags.
268268
*
269269
* @return tags
270270
*/

src/test/resources/com/datadog/api/client/v1/api/dashboards.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,18 @@ Feature: Dashboards
13471347
Then the response status is 200 OK
13481348
And the response "author_name" is equal to "Frog Account"
13491349

1350+
@team:DataDog/dashboards-backend
1351+
Scenario: Get a dashboard with five team tags and two AI tags
1352+
Given there is a valid "dashboard_with_team_and_ai_tags" in the system
1353+
And new "GetDashboard" request
1354+
And request contains "dashboard_id" parameter from "dashboard_with_team_and_ai_tags.id"
1355+
When the request is sent
1356+
Then the response status is 200 OK
1357+
And the response "tags" has length 7
1358+
And the response "tags" array contains value "team:epsilon"
1359+
And the response "tags" array contains value "ai:generated"
1360+
And the response "tags" array contains value "ai:edited"
1361+
13501362
@team:DataDog/reporting-and-sharing
13511363
Scenario: Get a shared dashboard returns "OK" response
13521364
Given there is a valid "dashboard" in the system

src/test/resources/com/datadog/api/client/v1/api/given.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
"tag": "Dashboards",
1212
"operationId": "CreateDashboard"
1313
},
14+
{
15+
"parameters": [
16+
{
17+
"name": "body",
18+
"value": "{\"title\": \"{{ unique }}\", \"layout_type\": \"ordered\", \"widgets\": [], \"tags\": [\"team:alpha\", \"team:beta\", \"team:gamma\", \"team:delta\", \"team:epsilon\", \"ai:generated\", \"ai:edited\"]}"
19+
}
20+
],
21+
"step": "there is a valid \"dashboard_with_team_and_ai_tags\" in the system",
22+
"key": "dashboard_with_team_and_ai_tags",
23+
"tag": "Dashboards",
24+
"operationId": "CreateDashboard"
25+
},
1426
{
1527
"parameters": [
1628
{

src/test/resources/com/datadog/api/client/v2/api/dashboard_lists.feature

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ Feature: Dashboard Lists
110110
When the request is sent
111111
Then the response status is 200 OK
112112

113+
@team:DataDog/dashboards-backend
114+
Scenario: Get dashboard list items with five team tags and two AI tags
115+
Given there is a valid "dashboard_list" in the system
116+
And there is a valid "dashboard_with_team_and_ai_tags" in the system
117+
And the "dashboard_list" has the "dashboard_with_team_and_ai_tags"
118+
And new "GetDashboardListItems" request
119+
And request contains "dashboard_list_id" parameter from "dashboard_list.id"
120+
When the request is sent
121+
Then the response status is 200 OK
122+
And the response "dashboards" has length 1
123+
And the response "dashboards[0].tags" has length 7
124+
And the response "dashboards[0].tags" array contains value "team:epsilon"
125+
And the response "dashboards[0].tags" array contains value "ai:generated"
126+
And the response "dashboards[0].tags" array contains value "ai:edited"
127+
113128
@generated @skip @team:DataDog/dashboards-backend
114129
Scenario: Get items of a Dashboard List returns "Not Found" response
115130
Given new "GetDashboardListItems" request

0 commit comments

Comments
 (0)