diff --git a/.apigentools-info b/.apigentools-info index a84b67ba556..7b3084d10b5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-22 14:41:00.939203", - "spec_repo_commit": "f75e7820" + "regenerated": "2023-05-23 13:54:22.420354", + "spec_repo_commit": "2ccd9d0a" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-22 14:41:00.955512", - "spec_repo_commit": "f75e7820" + "regenerated": "2023-05-23 13:54:22.432956", + "spec_repo_commit": "2ccd9d0a" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 022f56f06e3..268d9602444 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2234,9 +2234,6 @@ components: description: Query to filter the event stream with. example: '' type: string - show_year: - description: Option to display the year in the date column. - type: boolean tags_execution: description: The execution method for multi-value filters. Can be either and or or. diff --git a/api/datadogV1/model_event_stream_widget_definition.go b/api/datadogV1/model_event_stream_widget_definition.go index e06ea180689..c3b650e352a 100644 --- a/api/datadogV1/model_event_stream_widget_definition.go +++ b/api/datadogV1/model_event_stream_widget_definition.go @@ -18,8 +18,6 @@ type EventStreamWidgetDefinition struct { EventSize *WidgetEventSize `json:"event_size,omitempty"` // Query to filter the event stream with. Query string `json:"query"` - // Option to display the year in the date column. - ShowYear *bool `json:"show_year,omitempty"` // The execution method for multi-value filters. Can be either and or or. TagsExecution *string `json:"tags_execution,omitempty"` // Time setting for the widget. @@ -109,34 +107,6 @@ func (o *EventStreamWidgetDefinition) SetQuery(v string) { o.Query = v } -// GetShowYear returns the ShowYear field value if set, zero value otherwise. -func (o *EventStreamWidgetDefinition) GetShowYear() bool { - if o == nil || o.ShowYear == nil { - var ret bool - return ret - } - return *o.ShowYear -} - -// GetShowYearOk returns a tuple with the ShowYear field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventStreamWidgetDefinition) GetShowYearOk() (*bool, bool) { - if o == nil || o.ShowYear == nil { - return nil, false - } - return o.ShowYear, true -} - -// HasShowYear returns a boolean if a field has been set. -func (o *EventStreamWidgetDefinition) HasShowYear() bool { - return o != nil && o.ShowYear != nil -} - -// SetShowYear gets a reference to the given bool and assigns it to the ShowYear field. -func (o *EventStreamWidgetDefinition) SetShowYear(v bool) { - o.ShowYear = &v -} - // GetTagsExecution returns the TagsExecution field value if set, zero value otherwise. func (o *EventStreamWidgetDefinition) GetTagsExecution() string { if o == nil || o.TagsExecution == nil { @@ -310,9 +280,6 @@ func (o EventStreamWidgetDefinition) MarshalJSON() ([]byte, error) { toSerialize["event_size"] = o.EventSize } toSerialize["query"] = o.Query - if o.ShowYear != nil { - toSerialize["show_year"] = o.ShowYear - } if o.TagsExecution != nil { toSerialize["tags_execution"] = o.TagsExecution } @@ -346,7 +313,6 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { all := struct { EventSize *WidgetEventSize `json:"event_size,omitempty"` Query string `json:"query"` - ShowYear *bool `json:"show_year,omitempty"` TagsExecution *string `json:"tags_execution,omitempty"` Time *WidgetTime `json:"time,omitempty"` Title *string `json:"title,omitempty"` @@ -375,7 +341,7 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"event_size", "query", "show_year", "tags_execution", "time", "title", "title_align", "title_size", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"event_size", "query", "tags_execution", "time", "title", "title_align", "title_size", "type"}) } else { return err } @@ -405,7 +371,6 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } o.EventSize = all.EventSize o.Query = all.Query - o.ShowYear = all.ShowYear o.TagsExecution = all.TagsExecution if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { err = json.Unmarshal(bytes, &raw) diff --git a/examples/v1/dashboards/CreateDashboard_2634813877.go b/examples/v1/dashboards/CreateDashboard_2634813877.go index d2c3ba1cd99..4d6bd3ddc60 100644 --- a/examples/v1/dashboards/CreateDashboard_2634813877.go +++ b/examples/v1/dashboards/CreateDashboard_2634813877.go @@ -33,7 +33,6 @@ func main() { Query: "example-query", TagsExecution: datadog.PtrString("and"), EventSize: datadogV1.WIDGETEVENTSIZE_SMALL.Ptr(), - ShowYear: datadog.PtrBool(true), }}, }, }, diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze index fe60167b456..50f40ed1164 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze @@ -1 +1 @@ -2023-05-19T14:24:41.183Z \ No newline at end of file +2022-01-06T00:50:30.857Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml index 6c5da41ddff..c55720fcf54 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281","widgets":[{"definition":{"event_size":"s","query":"example-query","show_year":true,"tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0}}]} + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230","widgets":[{"definition":{"event_size":"s","query":"example-query","tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0}}]} form: {} headers: Accept: @@ -11,9 +11,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/dashboard response: - body: '{"id":"6fx-j89-9ip","title":"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281","description":"","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"free","url":"/dashboard/6fx-j89-9ip/test-createanewdashboardwitheventstreamwidget-1684506281","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"event_size":"s","query":"example-query","show_year":true,"tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0},"id":4666982916800865}],"notify_list":[],"created_at":"2023-05-19T14:24:41.495188+00:00","modified_at":"2023-05-19T14:24:41.495188+00:00","restricted_roles":[]} - - ' + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"2dc-bzm-gzi","title":"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230","url":"/dashboard/2dc-bzm-gzi/test-createanewdashboardwitheventstreamwidget-1641430230","created_at":"2022-01-06T00:50:31.037679+00:00","modified_at":"2022-01-06T00:50:31.037679+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","tags_execution":"and","query":"example-query","type":"event_stream","event_size":"s"},"layout":{"y":0,"width":47,"x":0,"height":38},"id":5676594590872385}],"layout_type":"free"}' code: 200 duration: '' headers: @@ -27,11 +25,9 @@ interactions: Accept: - application/json method: DELETE - url: https://api.datadoghq.com/api/v1/dashboard/6fx-j89-9ip + url: https://api.datadoghq.com/api/v1/dashboard/2dc-bzm-gzi response: - body: '{"deleted_dashboard_id":"6fx-j89-9ip"} - - ' + body: '{"deleted_dashboard_id":"2dc-bzm-gzi"}' code: 200 duration: '' headers: diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index ccf53d7edc3..80602421b55 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -277,7 +277,6 @@ Feature: Dashboards Then the response status is 200 OK And the response "widgets[0].definition.type" is equal to "event_stream" And the response "widgets[0].definition.query" is equal to "example-query" - And the response "widgets[0].definition.show_year" is equal to true @team:DataDog/dashboards-backend Scenario: Create a new dashboard with event_timeline widget diff --git a/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json index 5feee517753..db582c77448 100644 --- a/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json +++ b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json @@ -16,8 +16,7 @@ "type":"event_stream", "query":"example-query", "tags_execution":"and", - "event_size":"s", - "show_year": true + "event_size":"s" } } ],