From 34d289127cc585faf3bf42ad0101fca933fdd761 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 09:35:47 +0000 Subject: [PATCH] Remove notify_no_data default (#1732) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 ++++---- .generator/schemas/v1/openapi.yaml | 3 +-- src/datadog_api_client/v1/model/monitor_options.py | 2 +- tests/v1/features/monitors.feature | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 62d5ed1fe5..ebbbd0a2f5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-24 18:01:02.090771", - "spec_repo_commit": "7e490450" + "regenerated": "2023-10-25 09:00:22.540949", + "spec_repo_commit": "9ebdefa4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-24 18:01:02.104260", - "spec_repo_commit": "7e490450" + "regenerated": "2023-10-25 09:00:22.569393", + "spec_repo_commit": "9ebdefa4" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 29cfdad974..24a2e70d6c 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6773,9 +6773,8 @@ components: type: string type: array notify_no_data: - default: false description: A Boolean indicating whether this monitor notifies when data - stops reporting. + stops reporting. Defaults to `false`. type: boolean on_missing_data: $ref: '#/components/schemas/OnMissingDataOption' diff --git a/src/datadog_api_client/v1/model/monitor_options.py b/src/datadog_api_client/v1/model/monitor_options.py index dcbd9c06c7..78deb62b2b 100644 --- a/src/datadog_api_client/v1/model/monitor_options.py +++ b/src/datadog_api_client/v1/model/monitor_options.py @@ -257,7 +257,7 @@ def __init__( Setting ``notify_by`` to ``[*]`` configures the monitor to notify as a simple-alert. :type notify_by: [str], optional - :param notify_no_data: A Boolean indicating whether this monitor notifies when data stops reporting. + :param notify_no_data: A Boolean indicating whether this monitor notifies when data stops reporting. Defaults to ``false``. :type notify_no_data: bool, optional :param on_missing_data: Controls how groups or monitors are treated if an evaluation does not return any data points. diff --git a/tests/v1/features/monitors.feature b/tests/v1/features/monitors.feature index c3e549b27c..047e3ceb0b 100644 --- a/tests/v1/features/monitors.feature +++ b/tests/v1/features/monitors.feature @@ -157,7 +157,7 @@ Feature: Monitors Scenario: Edit a monitor returns "Bad Request" response Given new "UpdateMonitor" request And request contains "monitor_id" parameter from "REPLACE.ME" - And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "notify_no_data": false, "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "restricted_roles": [], "tags": [], "type": "query alert"} + And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "restricted_roles": [], "tags": [], "type": "query alert"} When the request is sent Then the response status is 400 Bad Request