diff --git a/.apigentools-info b/.apigentools-info index 89635118215..fc0aed49fe1 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-12 14:27:10.560083", - "spec_repo_commit": "3ebe762b" + "regenerated": "2024-12-12 15:23:56.400164", + "spec_repo_commit": "222e1f81" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-12 14:27:10.579554", - "spec_repo_commit": "3ebe762b" + "regenerated": "2024-12-12 15:23:56.419293", + "spec_repo_commit": "222e1f81" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 6537e03408d..fd16447031f 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -4654,11 +4654,6 @@ components: description: Widget column field. example: content type: string - is_clustering_pattern_field_path: - description: Identifies the clustering pattern field column, usable only - with logs_pattern_stream. - example: true - type: boolean width: $ref: '#/components/schemas/ListStreamColumnWidth' required: diff --git a/api/datadogV1/model_list_stream_column.go b/api/datadogV1/model_list_stream_column.go index f94c75b8cb6..810889babe0 100644 --- a/api/datadogV1/model_list_stream_column.go +++ b/api/datadogV1/model_list_stream_column.go @@ -14,8 +14,6 @@ import ( type ListStreamColumn struct { // Widget column field. Field string `json:"field"` - // Identifies the clustering pattern field column, usable only with logs_pattern_stream. - IsClusteringPatternFieldPath *bool `json:"is_clustering_pattern_field_path,omitempty"` // Widget column width. Width ListStreamColumnWidth `json:"width"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -65,34 +63,6 @@ func (o *ListStreamColumn) SetField(v string) { o.Field = v } -// GetIsClusteringPatternFieldPath returns the IsClusteringPatternFieldPath field value if set, zero value otherwise. -func (o *ListStreamColumn) GetIsClusteringPatternFieldPath() bool { - if o == nil || o.IsClusteringPatternFieldPath == nil { - var ret bool - return ret - } - return *o.IsClusteringPatternFieldPath -} - -// GetIsClusteringPatternFieldPathOk returns a tuple with the IsClusteringPatternFieldPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListStreamColumn) GetIsClusteringPatternFieldPathOk() (*bool, bool) { - if o == nil || o.IsClusteringPatternFieldPath == nil { - return nil, false - } - return o.IsClusteringPatternFieldPath, true -} - -// HasIsClusteringPatternFieldPath returns a boolean if a field has been set. -func (o *ListStreamColumn) HasIsClusteringPatternFieldPath() bool { - return o != nil && o.IsClusteringPatternFieldPath != nil -} - -// SetIsClusteringPatternFieldPath gets a reference to the given bool and assigns it to the IsClusteringPatternFieldPath field. -func (o *ListStreamColumn) SetIsClusteringPatternFieldPath(v bool) { - o.IsClusteringPatternFieldPath = &v -} - // GetWidth returns the Width field value. func (o *ListStreamColumn) GetWidth() ListStreamColumnWidth { if o == nil { @@ -123,9 +93,6 @@ func (o ListStreamColumn) MarshalJSON() ([]byte, error) { return datadog.Marshal(o.UnparsedObject) } toSerialize["field"] = o.Field - if o.IsClusteringPatternFieldPath != nil { - toSerialize["is_clustering_pattern_field_path"] = o.IsClusteringPatternFieldPath - } toSerialize["width"] = o.Width for key, value := range o.AdditionalProperties { @@ -137,9 +104,8 @@ func (o ListStreamColumn) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ListStreamColumn) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Field *string `json:"field"` - IsClusteringPatternFieldPath *bool `json:"is_clustering_pattern_field_path,omitempty"` - Width *ListStreamColumnWidth `json:"width"` + Field *string `json:"field"` + Width *ListStreamColumnWidth `json:"width"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -152,14 +118,13 @@ func (o *ListStreamColumn) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"field", "is_clustering_pattern_field_path", "width"}) + datadog.DeleteKeys(additionalProperties, &[]string{"field", "width"}) } else { return err } hasInvalidField := false o.Field = *all.Field - o.IsClusteringPatternFieldPath = all.IsClusteringPatternFieldPath if !all.Width.IsValid() { hasInvalidField = true } else { diff --git a/examples/v1/dashboards/CreateDashboard_1039800684.go b/examples/v1/dashboards/CreateDashboard_1039800684.go index 7ef9dab0042..3dc384cf688 100644 --- a/examples/v1/dashboards/CreateDashboard_1039800684.go +++ b/examples/v1/dashboards/CreateDashboard_1039800684.go @@ -29,9 +29,8 @@ func main() { Field: "timestamp", }, { - Width: datadogV1.LISTSTREAMCOLUMNWIDTH_AUTO, - Field: "message", - IsClusteringPatternFieldPath: datadog.PtrBool(true), + Width: datadogV1.LISTSTREAMCOLUMNWIDTH_AUTO, + Field: "message", }, }, Query: datadogV1.ListStreamQuery{ diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.freeze index f275079feea..7adcfc7197a 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.freeze @@ -1 +1 @@ -2024-11-20T19:43:46.485Z \ No newline at end of file +2024-12-11T19:18:02.796Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.yaml index bdc2767ea17..1882fb3a5ae 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}}]} + {"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"}}]} form: {} headers: Accept: @@ -12,9 +12,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/dashboard response: - body: '{"id":"r75-hd7-sd9","title":"Test-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget-1732131826 + 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/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":[]} + 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":[]} ' code: 200 @@ -31,9 +31,9 @@ interactions: - application/json id: 1 method: DELETE - url: https://api.datadoghq.com/api/v1/dashboard/r75-hd7-sd9 + url: https://api.datadoghq.com/api/v1/dashboard/fue-7tr-ubw response: - body: '{"deleted_dashboard_id":"r75-hd7-sd9"} + body: '{"deleted_dashboard_id":"fue-7tr-ubw"} ' code: 200 diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 208a4dd3966..ebcfc7a25bb 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -534,7 +534,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with logs_pattern_stream list_stream widget Given new "CreateDashboard" request - 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"}]}}]} + 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"}]}}]} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_pattern_stream"