diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 7056d83d64b..b448b1c9193 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1495,11 +1495,11 @@ components: nullable: true type: array tags: - description: List of team names representing ownership of a dashboard. + description: Tags associated with the dashboard. Supports up to five team tags and two AI tags. items: - description: The name of a Datadog team of the form `team:` + description: A tag of the form `team:` or `ai:`. type: string - maxItems: 5 + maxItems: 7 nullable: true type: array template_variable_presets: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b6a3ce30c87..e5cfad6fe5a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30747,11 +30747,11 @@ components: readOnly: true type: integer tags: - description: List of team names representing ownership of a dashboard. + description: Tags associated with the dashboard. Supports up to five team tags and two AI tags. items: - description: The name of a Datadog team, formatted as `team:` + description: A tag of the form `team:` or `ai:`. type: string - maxItems: 5 + maxItems: 7 nullable: true readOnly: true type: array diff --git a/examples/v1/dashboards/GetDashboard_3568243180.java b/examples/v1/dashboards/GetDashboard_3568243180.java new file mode 100644 index 00000000000..a0acad8c869 --- /dev/null +++ b/examples/v1/dashboards/GetDashboard_3568243180.java @@ -0,0 +1,27 @@ +// Get a dashboard with five team tags and two AI tags + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + // there is a valid "dashboard_with_team_and_ai_tags" in the system + String DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID = System.getenv("DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID"); + + try { + Dashboard result = apiInstance.getDashboard(DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#getDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.java b/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.java new file mode 100644 index 00000000000..7342a8ca55d --- /dev/null +++ b/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.java @@ -0,0 +1,27 @@ +// Get dashboard list items with five team tags and two AI tags + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DashboardListsApi; +import com.datadog.api.client.v2.model.DashboardListItems; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardListsApi apiInstance = new DashboardListsApi(defaultClient); + + // there is a valid "dashboard_list" in the system + Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID")); + + try { + DashboardListItems result = apiInstance.getDashboardListItems(DASHBOARD_LIST_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardListsApi#getDashboardListItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java index 0e830d7eb2b..acf78bd21dd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java +++ b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java @@ -471,7 +471,7 @@ public Dashboard addTagsItem(String tagsItem) { } /** - * List of team names representing ownership of a dashboard. + * Tags associated with the dashboard. Supports up to five team tags and two AI tags. * * @return tags */ diff --git a/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java b/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java index b1734ec1553..6a1642cda0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/DashboardListItem.java @@ -264,7 +264,7 @@ public Integer getPopularity() { } /** - * List of team names representing ownership of a dashboard. + * Tags associated with the dashboard. Supports up to five team tags and two AI tags. * * @return tags */ diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature index afe8356d4cd..aa4cacac024 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature @@ -1347,6 +1347,18 @@ Feature: Dashboards Then the response status is 200 OK And the response "author_name" is equal to "Frog Account" + @team:DataDog/dashboards-backend + Scenario: Get a dashboard with five team tags and two AI tags + Given there is a valid "dashboard_with_team_and_ai_tags" in the system + And new "GetDashboard" request + And request contains "dashboard_id" parameter from "dashboard_with_team_and_ai_tags.id" + When the request is sent + Then the response status is 200 OK + And the response "tags" has length 7 + And the response "tags" array contains value "team:epsilon" + And the response "tags" array contains value "ai:generated" + And the response "tags" array contains value "ai:edited" + @team:DataDog/reporting-and-sharing Scenario: Get a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system diff --git a/src/test/resources/com/datadog/api/client/v1/api/given.json b/src/test/resources/com/datadog/api/client/v1/api/given.json index 3c1540f6faa..f54c9c5b57d 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/given.json +++ b/src/test/resources/com/datadog/api/client/v1/api/given.json @@ -11,6 +11,18 @@ "tag": "Dashboards", "operationId": "CreateDashboard" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"title\": \"{{ unique }}\", \"layout_type\": \"ordered\", \"widgets\": [], \"tags\": [\"team:alpha\", \"team:beta\", \"team:gamma\", \"team:delta\", \"team:epsilon\", \"ai:generated\", \"ai:edited\"]}" + } + ], + "step": "there is a valid \"dashboard_with_team_and_ai_tags\" in the system", + "key": "dashboard_with_team_and_ai_tags", + "tag": "Dashboards", + "operationId": "CreateDashboard" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/dashboard_lists.feature b/src/test/resources/com/datadog/api/client/v2/api/dashboard_lists.feature index 1d36afaadd5..165ff0d9a24 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/dashboard_lists.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/dashboard_lists.feature @@ -110,6 +110,21 @@ Feature: Dashboard Lists When the request is sent Then the response status is 200 OK + @team:DataDog/dashboards-backend + Scenario: Get dashboard list items with five team tags and two AI tags + Given there is a valid "dashboard_list" in the system + And there is a valid "dashboard_with_team_and_ai_tags" in the system + And the "dashboard_list" has the "dashboard_with_team_and_ai_tags" + And new "GetDashboardListItems" request + And request contains "dashboard_list_id" parameter from "dashboard_list.id" + When the request is sent + Then the response status is 200 OK + And the response "dashboards" has length 1 + And the response "dashboards[0].tags" has length 7 + And the response "dashboards[0].tags" array contains value "team:epsilon" + And the response "dashboards[0].tags" array contains value "ai:generated" + And the response "dashboards[0].tags" array contains value "ai:edited" + @generated @skip @team:DataDog/dashboards-backend Scenario: Get items of a Dashboard List returns "Not Found" response Given new "GetDashboardListItems" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index bbc7f46273e..7718d575811 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -329,6 +329,22 @@ "tag": "Dashboard Lists", "operationId": "CreateDashboardListItems" }, + { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\"dashboards\": [{\"id\": \"{{ dashboard_with_team_and_ai_tags.id }}\", \"type\": \"custom_timeboard\"}]}" + } + ], + "step": "the \"dashboard_list\" has the \"dashboard_with_team_and_ai_tags\"", + "key": "dashboard_list_dashboard_with_team_and_ai_tags", + "tag": "Dashboard Lists", + "operationId": "CreateDashboardListItems" + }, { "parameters": [ { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index 67ec498e45b..2fb7b340844 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -931,6 +931,13 @@ "scenario": "Get a dashboard returns 'author_name'", "version": "v1" }, + { + "feature": "Dashboards", + "feature_file": "../../com/datadog/api/client/v1/api/dashboards.feature", + "file": "v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json", + "scenario": "Get a dashboard with five team tags and two AI tags", + "version": "v1" + }, { "feature": "Dashboards", "feature_file": "../../com/datadog/api/client/v1/api/dashboards.feature", @@ -4662,6 +4669,13 @@ "scenario": "Delete custom timeboard dashboard from an existing dashboard list returns \"OK\" response", "version": "v2" }, + { + "feature": "Dashboard Lists", + "feature_file": "../../com/datadog/api/client/v2/api/dashboard_lists.feature", + "file": "v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json", + "scenario": "Get dashboard list items with five team tags and two AI tags", + "version": "v2" + }, { "feature": "Dashboard Lists", "feature_file": "../../com/datadog/api/client/v2/api/dashboard_lists.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json b/src/test/resources/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json new file mode 100644 index 00000000000..ee94945f827 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json @@ -0,0 +1,35 @@ +{ + "api": "Dashboards", + "expected_status": 200, + "feature": "Dashboards", + "id": "v1/Dashboards/Get a dashboard with five team tags and two AI tags", + "operation_id": "GetDashboard", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dashboard_with_team_and_ai_tags.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v1/dashboard/{dashboard_id}" + }, + "scenario": "Get a dashboard with five team tags and two AI tags", + "schema_version": 1, + "version": "v1" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json b/src/test/resources/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json new file mode 100644 index 00000000000..8d3ac8ea991 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json @@ -0,0 +1,35 @@ +{ + "api": "DashboardLists", + "expected_status": 200, + "feature": "Dashboard Lists", + "id": "v2/Dashboard Lists/Get dashboard list items with five team tags and two AI tags", + "operation_id": "GetDashboardListItems", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "dashboard_list_id", + "required": true, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "path": "dashboard_list.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + }, + "scenario": "Get dashboard list items with five team tags and two AI tags", + "schema_version": 1, + "version": "v2" +}