diff --git a/.apigentools-info b/.apigentools-info index 227d5a1eb8e..29415e02935 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-13 12:57:54.756060", - "spec_repo_commit": "1ae19d0" + "regenerated": "2022-01-13 15:32:12.340188", + "spec_repo_commit": "bc275d1" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-13 12:57:54.780238", - "spec_repo_commit": "1ae19d0" + "regenerated": "2022-01-13 15:32:12.362669", + "spec_repo_commit": "bc275d1" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ddd8a09ab66..948120c8a29 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -16460,6 +16460,14 @@ paths: required: false schema: type: boolean + - description: 'When `true`, this query only returns deleted custom created + + or cloned dashboards.' + in: query + name: filter[deleted] + required: false + schema: + type: boolean responses: '200': content: diff --git a/api/v1/datadog/api_dashboards.go b/api/v1/datadog/api_dashboards.go index 47e1f1960f1..d5718395ec5 100644 --- a/api/v1/datadog/api_dashboards.go +++ b/api/v1/datadog/api_dashboards.go @@ -678,13 +678,15 @@ func (a *DashboardsApiService) getDashboardExecute(r apiGetDashboardRequest) (Da } type apiListDashboardsRequest struct { - ctx _context.Context - ApiService *DashboardsApiService - filterShared *bool + ctx _context.Context + ApiService *DashboardsApiService + filterShared *bool + filterDeleted *bool } type ListDashboardsOptionalParameters struct { - FilterShared *bool + FilterShared *bool + FilterDeleted *bool } func NewListDashboardsOptionalParameters() *ListDashboardsOptionalParameters { @@ -695,6 +697,10 @@ func (r *ListDashboardsOptionalParameters) WithFilterShared(filterShared bool) * r.FilterShared = &filterShared return r } +func (r *ListDashboardsOptionalParameters) WithFilterDeleted(filterDeleted bool) *ListDashboardsOptionalParameters { + r.FilterDeleted = &filterDeleted + return r +} /* * ListDashboards Get all dashboards @@ -716,6 +722,7 @@ func (a *DashboardsApiService) ListDashboards(ctx _context.Context, o ...ListDas if o != nil { req.filterShared = o[0].FilterShared + req.filterDeleted = o[0].FilterDeleted } return req.ApiService.listDashboardsExecute(req) @@ -749,6 +756,9 @@ func (a *DashboardsApiService) listDashboardsExecute(r apiListDashboardsRequest) if r.filterShared != nil { localVarQueryParams.Add("filter[shared]", parameterToString(*r.filterShared, "")) } + if r.filterDeleted != nil { + localVarQueryParams.Add("filter[deleted]", parameterToString(*r.filterDeleted, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api/v1/datadog/docs/DashboardsApi.md b/api/v1/datadog/docs/DashboardsApi.md index 53af59694a6..15a2514e625 100644 --- a/api/v1/datadog/docs/DashboardsApi.md +++ b/api/v1/datadog/docs/DashboardsApi.md @@ -299,8 +299,10 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) filterShared := true // bool | When `true`, this query only returns shared custom created or cloned dashboards. (optional) + filterDeleted := true // bool | When `true`, this query only returns deleted custom created or cloned dashboards. (optional) optionalParams := datadog.ListDashboardsOptionalParameters{ FilterShared: &filterShared, + FilterDeleted: &filterDeleted, } configuration := datadog.NewConfiguration() @@ -323,9 +325,10 @@ func main() { Other parameters are passed through a pointer to a ListDashboardsOptionalParameters struct. -| Name | Type | Description | Notes | -| ---------------- | -------- | ------------------------------------------------------------------------------------------ | ----- | -| **filterShared** | **bool** | When `true`, this query only returns shared custom created or cloned dashboards. | +| Name | Type | Description | Notes | +| ----------------- | -------- | ------------------------------------------------------------------------------------------- | ----- | +| **filterShared** | **bool** | When `true`, this query only returns shared custom created or cloned dashboards. | +| **filterDeleted** | **bool** | When `true`, this query only returns deleted custom created or cloned dashboards. | ### Return type diff --git a/examples/v1/dashboards/ListDashboards.go b/examples/v1/dashboards/ListDashboards.go index 2ca190a0494..6c73148b0cd 100644 --- a/examples/v1/dashboards/ListDashboards.go +++ b/examples/v1/dashboards/ListDashboards.go @@ -15,7 +15,7 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - resp, r, err := apiClient.DashboardsApi.ListDashboards(ctx, *datadog.NewListDashboardsOptionalParameters().WithFilterShared(false)) + resp, r, err := apiClient.DashboardsApi.ListDashboards(ctx, *datadog.NewListDashboardsOptionalParameters().WithFilterShared(false).WithFilterDeleted(false)) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.ListDashboards`: %v\n", err) diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index e1c14adc9fe..484060bea10 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -429,6 +429,7 @@ Feature: Dashboards Given new "ListDashboards" request And there is a valid "dashboard" in the system And request contains "filter[shared]" parameter with value false + And request contains "filter[deleted]" parameter with value false When the request is sent Then the response status is 200 OK