From ea236c276e9bac30c5b9808c1697e7553390a5ac Mon Sep 17 00:00:00 2001 From: Yuriy Tseretyan Date: Tue, 8 Feb 2022 10:09:37 -0500 Subject: [PATCH] add missing option to swagger spec (#45070) --- .../ngalert/api/tooling/definitions/cortex-ruler.go | 1 + pkg/services/ngalert/api/tooling/post.json | 10 ++++++---- pkg/services/ngalert/api/tooling/spec.json | 10 ++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go b/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go index 748377e7c70..5707b4d01f2 100644 --- a/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go +++ b/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go @@ -355,6 +355,7 @@ type ExecutionErrorState string const ( AlertingErrState ExecutionErrorState = "Alerting" + ErrorErrState ExecutionErrorState = "Error" ) // swagger:model diff --git a/pkg/services/ngalert/api/tooling/post.json b/pkg/services/ngalert/api/tooling/post.json index 729eaf5476a..641089a1746 100644 --- a/pkg/services/ngalert/api/tooling/post.json +++ b/pkg/services/ngalert/api/tooling/post.json @@ -874,10 +874,11 @@ }, "exec_err_state": { "enum": [ - "Alerting" + "Alerting", + "Error" ], "type": "string", - "x-go-enum-desc": "Alerting AlertingErrState", + "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState", "x-go-name": "ExecErrState" }, "id": { @@ -1835,10 +1836,11 @@ }, "exec_err_state": { "enum": [ - "Alerting" + "Alerting", + "Error" ], "type": "string", - "x-go-enum-desc": "Alerting AlertingErrState", + "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState", "x-go-name": "ExecErrState" }, "no_data_state": { diff --git a/pkg/services/ngalert/api/tooling/spec.json b/pkg/services/ngalert/api/tooling/spec.json index ff865cbd238..811d0e52854 100644 --- a/pkg/services/ngalert/api/tooling/spec.json +++ b/pkg/services/ngalert/api/tooling/spec.json @@ -2627,9 +2627,10 @@ "exec_err_state": { "type": "string", "enum": [ - "Alerting" + "Alerting", + "Error" ], - "x-go-enum-desc": "Alerting AlertingErrState", + "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState", "x-go-name": "ExecErrState" }, "id": { @@ -3589,9 +3590,10 @@ "exec_err_state": { "type": "string", "enum": [ - "Alerting" + "Alerting", + "Error" ], - "x-go-enum-desc": "Alerting AlertingErrState", + "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState", "x-go-name": "ExecErrState" }, "no_data_state": {