Skip to content

Commit

Permalink
Regenerate client from commit 9ebdefa4 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 25, 2023
1 parent 4faa5bf commit ee0ef07
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-24 18:01:08.629956",
"spec_repo_commit": "7e490450"
"regenerated": "2023-10-25 09:00:14.250461",
"spec_repo_commit": "9ebdefa4"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-24 18:01:08.644099",
"spec_repo_commit": "7e490450"
"regenerated": "2023-10-25 09:00:14.266048",
"spec_repo_commit": "9ebdefa4"
}
}
}
3 changes: 1 addition & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 1 addition & 5 deletions api/datadogV1/model_monitor_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type MonitorOptions struct {
// For example, a query grouped by `cluster` and `namespace` cannot notify on `region`.
// Setting `notify_by` to `[*]` configures the monitor to notify as a simple-alert.
NotifyBy []string `json:"notify_by,omitempty"`
// A Boolean indicating whether this monitor notifies when data stops reporting.
// A Boolean indicating whether this monitor notifies when data stops reporting. Defaults to `false`.
NotifyNoData *bool `json:"notify_no_data,omitempty"`
// Controls how groups or monitors are treated if an evaluation does not return any data points.
// The default option results in different behavior depending on the monitor query type.
Expand Down Expand Up @@ -138,8 +138,6 @@ func NewMonitorOptions() *MonitorOptions {
this.NotificationPresetName = &notificationPresetName
var notifyAudit bool = false
this.NotifyAudit = &notifyAudit
var notifyNoData bool = false
this.NotifyNoData = &notifyNoData
this.RenotifyInterval = *datadog.NewNullableInt64(nil)
this.TimeoutH = *datadog.NewNullableInt64(nil)
return &this
Expand All @@ -162,8 +160,6 @@ func NewMonitorOptionsWithDefaults() *MonitorOptions {
this.NotificationPresetName = &notificationPresetName
var notifyAudit bool = false
this.NotifyAudit = &notifyAudit
var notifyNoData bool = false
this.NotifyNoData = &notifyNoData
this.RenotifyInterval = *datadog.NewNullableInt64(nil)
this.TimeoutH = *datadog.NewNullableInt64(nil)
return &this
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/features/v1/monitors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ee0ef07

Please sign in to comment.