Skip to content

Commit 54ccf19

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Remove unnecessary field in list stream column config (#2616)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent c9cf567 commit 54ccf19

File tree

7 files changed

+15
-55
lines changed

7 files changed

+15
-55
lines changed

.apigentools-info

+4-4
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-12-12 14:27:18.507650",
8-
"spec_repo_commit": "3ebe762b"
7+
"regenerated": "2024-12-12 15:23:55.428002",
8+
"spec_repo_commit": "222e1f81"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-12 14:27:18.526897",
13-
"spec_repo_commit": "3ebe762b"
12+
"regenerated": "2024-12-12 15:23:55.483586",
13+
"spec_repo_commit": "222e1f81"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -4654,11 +4654,6 @@ components:
46544654
description: Widget column field.
46554655
example: content
46564656
type: string
4657-
is_clustering_pattern_field_path:
4658-
description: Identifies the clustering pattern field column, usable only
4659-
with logs_pattern_stream.
4660-
example: true
4661-
type: boolean
46624657
width:
46634658
$ref: '#/components/schemas/ListStreamColumnWidth'
46644659
required:

examples/v1/dashboards/CreateDashboard_1039800684.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public static void main(String[] args) {
4545
.field("timestamp"),
4646
new ListStreamColumn()
4747
.width(ListStreamColumnWidth.AUTO)
48-
.field("message")
49-
.isClusteringPatternFieldPath(true)))
48+
.field("message")))
5049
.query(
5150
new ListStreamQuery()
5251
.dataSource(

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

+2-36
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,14 @@
1818
import java.util.Objects;
1919

2020
/** Widget column. */
21-
@JsonPropertyOrder({
22-
ListStreamColumn.JSON_PROPERTY_FIELD,
23-
ListStreamColumn.JSON_PROPERTY_IS_CLUSTERING_PATTERN_FIELD_PATH,
24-
ListStreamColumn.JSON_PROPERTY_WIDTH
25-
})
21+
@JsonPropertyOrder({ListStreamColumn.JSON_PROPERTY_FIELD, ListStreamColumn.JSON_PROPERTY_WIDTH})
2622
@jakarta.annotation.Generated(
2723
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2824
public class ListStreamColumn {
2925
@JsonIgnore public boolean unparsed = false;
3026
public static final String JSON_PROPERTY_FIELD = "field";
3127
private String field;
3228

33-
public static final String JSON_PROPERTY_IS_CLUSTERING_PATTERN_FIELD_PATH =
34-
"is_clustering_pattern_field_path";
35-
private Boolean isClusteringPatternFieldPath;
36-
3729
public static final String JSON_PROPERTY_WIDTH = "width";
3830
private ListStreamColumnWidth width;
3931

@@ -68,27 +60,6 @@ public void setField(String field) {
6860
this.field = field;
6961
}
7062

71-
public ListStreamColumn isClusteringPatternFieldPath(Boolean isClusteringPatternFieldPath) {
72-
this.isClusteringPatternFieldPath = isClusteringPatternFieldPath;
73-
return this;
74-
}
75-
76-
/**
77-
* Identifies the clustering pattern field column, usable only with logs_pattern_stream.
78-
*
79-
* @return isClusteringPatternFieldPath
80-
*/
81-
@jakarta.annotation.Nullable
82-
@JsonProperty(JSON_PROPERTY_IS_CLUSTERING_PATTERN_FIELD_PATH)
83-
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
84-
public Boolean getIsClusteringPatternFieldPath() {
85-
return isClusteringPatternFieldPath;
86-
}
87-
88-
public void setIsClusteringPatternFieldPath(Boolean isClusteringPatternFieldPath) {
89-
this.isClusteringPatternFieldPath = isClusteringPatternFieldPath;
90-
}
91-
9263
public ListStreamColumn width(ListStreamColumnWidth width) {
9364
this.width = width;
9465
this.unparsed |= !width.isValid();
@@ -170,25 +141,20 @@ public boolean equals(Object o) {
170141
}
171142
ListStreamColumn listStreamColumn = (ListStreamColumn) o;
172143
return Objects.equals(this.field, listStreamColumn.field)
173-
&& Objects.equals(
174-
this.isClusteringPatternFieldPath, listStreamColumn.isClusteringPatternFieldPath)
175144
&& Objects.equals(this.width, listStreamColumn.width)
176145
&& Objects.equals(this.additionalProperties, listStreamColumn.additionalProperties);
177146
}
178147

179148
@Override
180149
public int hashCode() {
181-
return Objects.hash(field, isClusteringPatternFieldPath, width, additionalProperties);
150+
return Objects.hash(field, width, additionalProperties);
182151
}
183152

184153
@Override
185154
public String toString() {
186155
StringBuilder sb = new StringBuilder();
187156
sb.append("class ListStreamColumn {\n");
188157
sb.append(" field: ").append(toIndentedString(field)).append("\n");
189-
sb.append(" isClusteringPatternFieldPath: ")
190-
.append(toIndentedString(isClusteringPatternFieldPath))
191-
.append("\n");
192158
sb.append(" width: ").append(toIndentedString(width)).append("\n");
193159
sb.append(" additionalProperties: ")
194160
.append(toIndentedString(additionalProperties))
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-20T19:43:46.485Z
1+
2024-12-11T19:18:02.796Z

src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget-1732131826 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"},{\"field\":\"message\",\"is_clustering_pattern_field_path\":true,\"width\":\"auto\"}],\"query\":{\"clustering_pattern_field_path\":\"message\",\"data_source\":\"logs_pattern_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}"
6+
"json": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget-1733944682 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"},{\"field\":\"message\",\"width\":\"auto\"}],\"query\":{\"clustering_pattern_field_path\":\"message\",\"data_source\":\"logs_pattern_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"id\":\"r75-hd7-sd9\",\"title\":\"Test-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget-1732131826 with list_stream widget\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/r75-hd7-sd9/test-createanewdashboardwithlogspatternstreamliststreamwidget-1732131826-with-li\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"},{\"field\":\"message\",\"is_clustering_pattern_field_path\":true,\"width\":\"auto\"}],\"query\":{\"clustering_pattern_field_path\":\"message\",\"data_source\":\"logs_pattern_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":6154246442450384}],\"notify_list\":null,\"created_at\":\"2024-11-20T19:43:46.871965+00:00\",\"modified_at\":\"2024-11-20T19:43:46.871965+00:00\",\"restricted_roles\":[]}\n",
15+
"body": "{\"id\":\"fue-7tr-ubw\",\"title\":\"Test-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget-1733944682 with list_stream widget\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/fue-7tr-ubw/test-createanewdashboardwithlogspatternstreamliststreamwidget-1733944682-with-li\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"},{\"field\":\"message\",\"width\":\"auto\"}],\"query\":{\"clustering_pattern_field_path\":\"message\",\"data_source\":\"logs_pattern_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":4674889262305585}],\"notify_list\":null,\"created_at\":\"2024-12-11T19:18:03.039937+00:00\",\"modified_at\":\"2024-12-11T19:18:03.039937+00:00\",\"restricted_roles\":[]}\n",
1616
"headers": {
1717
"Content-Type": [
1818
"application/json"
@@ -27,18 +27,18 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "efba31bd-b3f1-473f-e30b-1697b2cc04b1"
30+
"id": "ae4564ca-0ff7-f493-3223-c9bf59642d26"
3131
},
3232
{
3333
"httpRequest": {
3434
"headers": {},
3535
"method": "DELETE",
36-
"path": "/api/v1/dashboard/r75-hd7-sd9",
36+
"path": "/api/v1/dashboard/fue-7tr-ubw",
3737
"keepAlive": false,
3838
"secure": true
3939
},
4040
"httpResponse": {
41-
"body": "{\"deleted_dashboard_id\":\"r75-hd7-sd9\"}\n",
41+
"body": "{\"deleted_dashboard_id\":\"fue-7tr-ubw\"}\n",
4242
"headers": {
4343
"Content-Type": [
4444
"application/json"
@@ -53,6 +53,6 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "d71f08f7-6763-c0e7-e498-162bb5fc9fea"
56+
"id": "6f623174-c3b7-b7f8-f17e-f055a28e2d98"
5757
}
5858
]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ Feature: Dashboards
534534
@team:DataDog/dashboards-backend
535535
Scenario: Create a new dashboard with logs_pattern_stream list_stream widget
536536
Given new "CreateDashboard" request
537-
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"},{"width":"auto","field":"message", "is_clustering_pattern_field_path": true}],"query":{"data_source":"logs_pattern_stream","query_string":"","clustering_pattern_field_path":"message","group_by":[{"facet":"service"}]}, "response_format":"event_list"}]}}]}
537+
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"},{"width":"auto","field":"message"}],"query":{"data_source":"logs_pattern_stream","query_string":"","clustering_pattern_field_path":"message","group_by":[{"facet":"service"}]}, "response_format":"event_list"}]}}]}
538538
When the request is sent
539539
Then the response status is 200 OK
540540
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_pattern_stream"

0 commit comments

Comments
 (0)