Skip to content

Commit 3dd0f2e

Browse files
authored
chore: update alerting swagger spec
1 parent 333ed37 commit 3dd0f2e

3 files changed

Lines changed: 61 additions & 436 deletions

File tree

pkg/services/ngalert/api/tooling/api.json

Lines changed: 17 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@
338338
"type": "object"
339339
},
340340
"AlertRuleNotificationSettingsExport": {
341+
"description": "Field name mismatches with Terraform provider schema are noted where applicable.",
341342
"properties": {
342343
"group_by": {
343344
"items": {
@@ -352,12 +353,14 @@
352353
"type": "string"
353354
},
354355
"mute_time_intervals": {
356+
"description": "TF -\u003e `mute_timings`",
355357
"items": {
356358
"type": "string"
357359
},
358360
"type": "array"
359361
},
360362
"receiver": {
363+
"description": "TF -\u003e `contact_point`",
361364
"type": "string"
362365
},
363366
"repeat_interval": {
@@ -967,7 +970,9 @@
967970
},
968971
"type": "object"
969972
},
970-
"EvalQueriesResponse": {},
973+
"EvalQueriesResponse": {
974+
"type": "object"
975+
},
971976
"ExplorePanelsState": {
972977
"description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties"
973978
},
@@ -2435,7 +2440,6 @@
24352440
"type": "object"
24362441
},
24372442
"PagerdutyImage": {
2438-
"description": "PagerdutyImage is an image",
24392443
"properties": {
24402444
"alt": {
24412445
"type": "string"
@@ -2447,10 +2451,10 @@
24472451
"type": "string"
24482452
}
24492453
},
2454+
"title": "PagerdutyImage is an image.",
24502455
"type": "object"
24512456
},
24522457
"PagerdutyLink": {
2453-
"description": "PagerdutyLink is a link",
24542458
"properties": {
24552459
"href": {
24562460
"type": "string"
@@ -2459,6 +2463,7 @@
24592463
"type": "string"
24602464
}
24612465
},
2466+
"title": "PagerdutyLink is a link.",
24622467
"type": "object"
24632468
},
24642469
"PermissionDenied": {
@@ -4241,7 +4246,7 @@
42414246
"type": "object"
42424247
},
42434248
"Userinfo": {
4244-
"description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
4249+
"description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a [URL]. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
42454250
"type": "object"
42464251
},
42474252
"ValidationError": {
@@ -4417,22 +4422,6 @@
44174422
"type": "object"
44184423
},
44194424
"alertGroup": {
4420-
"description": "AlertGroup alert group",
4421-
"properties": {
4422-
"alerts": {
4423-
"description": "alerts",
4424-
"items": {
4425-
"$ref": "#/definitions/gettableAlert"
4426-
},
4427-
"type": "array"
4428-
},
4429-
"labels": {
4430-
"$ref": "#/definitions/labelSet"
4431-
},
4432-
"receiver": {
4433-
"$ref": "#/definitions/receiver"
4434-
}
4435-
},
44364425
"required": [
44374426
"alerts",
44384427
"labels",
@@ -4441,9 +4430,9 @@
44414430
"type": "object"
44424431
},
44434432
"alertGroups": {
4444-
"description": "AlertGroups alert groups",
44454433
"items": {
4446-
"$ref": "#/definitions/alertGroup"
4434+
"$ref": "#/definitions/alertGroup",
4435+
"type": "object"
44474436
},
44484437
"type": "array"
44494438
},
@@ -4546,48 +4535,6 @@
45464535
"type": "object"
45474536
},
45484537
"gettableAlert": {
4549-
"properties": {
4550-
"annotations": {
4551-
"$ref": "#/definitions/labelSet"
4552-
},
4553-
"endsAt": {
4554-
"description": "ends at",
4555-
"format": "date-time",
4556-
"type": "string"
4557-
},
4558-
"fingerprint": {
4559-
"description": "fingerprint",
4560-
"type": "string"
4561-
},
4562-
"generatorURL": {
4563-
"description": "generator URL\nFormat: uri",
4564-
"format": "uri",
4565-
"type": "string"
4566-
},
4567-
"labels": {
4568-
"$ref": "#/definitions/labelSet"
4569-
},
4570-
"receivers": {
4571-
"description": "receivers",
4572-
"items": {
4573-
"$ref": "#/definitions/receiver"
4574-
},
4575-
"type": "array"
4576-
},
4577-
"startsAt": {
4578-
"description": "starts at",
4579-
"format": "date-time",
4580-
"type": "string"
4581-
},
4582-
"status": {
4583-
"$ref": "#/definitions/alertStatus"
4584-
},
4585-
"updatedAt": {
4586-
"description": "updated at",
4587-
"format": "date-time",
4588-
"type": "string"
4589-
}
4590-
},
45914538
"required": [
45924539
"labels",
45934540
"annotations",
@@ -4601,8 +4548,10 @@
46014548
"type": "object"
46024549
},
46034550
"gettableAlerts": {
4551+
"description": "GettableAlerts gettable alerts",
46044552
"items": {
4605-
"$ref": "#/definitions/gettableAlert"
4553+
"$ref": "#/definitions/gettableAlert",
4554+
"type": "object"
46064555
},
46074556
"type": "array"
46084557
},
@@ -4658,35 +4607,12 @@
46584607
"gettableSilences": {
46594608
"description": "GettableSilences gettable silences",
46604609
"items": {
4661-
"$ref": "#/definitions/gettableSilence"
4610+
"$ref": "#/definitions/gettableSilence",
4611+
"type": "object"
46624612
},
46634613
"type": "array"
46644614
},
46654615
"integration": {
4666-
"description": "Integration integration",
4667-
"properties": {
4668-
"lastNotifyAttempt": {
4669-
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
4670-
"format": "date-time",
4671-
"type": "string"
4672-
},
4673-
"lastNotifyAttemptDuration": {
4674-
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
4675-
"type": "string"
4676-
},
4677-
"lastNotifyAttemptError": {
4678-
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
4679-
"type": "string"
4680-
},
4681-
"name": {
4682-
"description": "name",
4683-
"type": "string"
4684-
},
4685-
"sendResolved": {
4686-
"description": "send resolved",
4687-
"type": "boolean"
4688-
}
4689-
},
46904616
"required": [
46914617
"name",
46924618
"sendResolved"
@@ -4807,6 +4733,7 @@
48074733
"type": "array"
48084734
},
48094735
"postableSilence": {
4736+
"description": "PostableSilence postable silence",
48104737
"properties": {
48114738
"comment": {
48124739
"description": "comment",
@@ -4844,23 +4771,6 @@
48444771
"type": "object"
48454772
},
48464773
"receiver": {
4847-
"properties": {
4848-
"active": {
4849-
"description": "active",
4850-
"type": "boolean"
4851-
},
4852-
"integrations": {
4853-
"description": "integrations",
4854-
"items": {
4855-
"$ref": "#/definitions/integration"
4856-
},
4857-
"type": "array"
4858-
},
4859-
"name": {
4860-
"description": "name",
4861-
"type": "string"
4862-
}
4863-
},
48644774
"required": [
48654775
"active",
48664776
"integrations",

0 commit comments

Comments
 (0)