Skip to content

Commit 36cc865

Browse files
chore: update alerting swagger spec
1 parent ae9460b commit 36cc865

File tree

3 files changed

+59
-36
lines changed

3 files changed

+59
-36
lines changed

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

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165
},
166166
"AlertRuleEditorSettings": {
167167
"properties": {
168+
"simplified_notifications_section": {
169+
"type": "boolean"
170+
},
168171
"simplified_query_and_expressions_section": {
169172
"type": "boolean"
170173
}
@@ -755,7 +758,7 @@
755758
"type": "string"
756759
},
757760
"ErrorSource": {
758-
"$ref": "#/definitions/ErrorSource"
761+
"$ref": "#/definitions/Source"
759762
},
760763
"Frames": {
761764
"$ref": "#/definitions/Frames"
@@ -965,10 +968,6 @@
965968
},
966969
"type": "object"
967970
},
968-
"ErrorSource": {
969-
"description": "ErrorSource type defines the source of the error",
970-
"type": "string"
971-
},
972971
"ErrorType": {
973972
"title": "ErrorType models the different API error types.",
974973
"type": "string"
@@ -3606,6 +3605,9 @@
36063605
},
36073606
"RuleDiscovery": {
36083607
"properties": {
3608+
"groupNextToken": {
3609+
"type": "string"
3610+
},
36093611
"groups": {
36103612
"items": {
36113613
"$ref": "#/definitions/RuleGroup"
@@ -3975,6 +3977,10 @@
39753977
"SmtpNotEnabled": {
39763978
"$ref": "#/definitions/ResponseDetails"
39773979
},
3980+
"Source": {
3981+
"title": "Source type defines the status source.",
3982+
"type": "string"
3983+
},
39783984
"Span": {
39793985
"properties": {
39803986
"Length": {
@@ -4642,6 +4648,7 @@
46424648
"type": "object"
46434649
},
46444650
"alertGroups": {
4651+
"description": "AlertGroups alert groups",
46454652
"items": {
46464653
"$ref": "#/definitions/alertGroup",
46474654
"type": "object"
@@ -4803,6 +4810,7 @@
48034810
"type": "object"
48044811
},
48054812
"gettableAlerts": {
4813+
"description": "GettableAlerts gettable alerts",
48064814
"items": {
48074815
"$ref": "#/definitions/gettableAlert",
48084816
"type": "object"
@@ -4927,6 +4935,7 @@
49274935
"type": "object"
49284936
},
49294937
"gettableSilences": {
4938+
"description": "GettableSilences gettable silences",
49304939
"items": {
49314940
"$ref": "#/definitions/gettableSilence",
49324941
"type": "object"
@@ -6240,7 +6249,7 @@
62406249
}
62416250
}
62426251
},
6243-
"summary": "Get all notification templates.",
6252+
"summary": "Get all notification template groups.",
62446253
"tags": [
62456254
"provisioning"
62466255
]
@@ -6251,7 +6260,7 @@
62516260
"operationId": "RouteDeleteTemplate",
62526261
"parameters": [
62536262
{
6254-
"description": "Template name",
6263+
"description": "Template group name",
62556264
"in": "path",
62566265
"name": "name",
62576266
"required": true,
@@ -6275,7 +6284,7 @@
62756284
}
62766285
}
62776286
},
6278-
"summary": "Delete a template.",
6287+
"summary": "Delete a notification template group.",
62796288
"tags": [
62806289
"provisioning"
62816290
]
@@ -6284,7 +6293,7 @@
62846293
"operationId": "RouteGetTemplate",
62856294
"parameters": [
62866295
{
6287-
"description": "Template Name",
6296+
"description": "Template group name",
62886297
"in": "path",
62896298
"name": "name",
62906299
"required": true,
@@ -6305,7 +6314,7 @@
63056314
}
63066315
}
63076316
},
6308-
"summary": "Get a notification template.",
6317+
"summary": "Get a notification template group.",
63096318
"tags": [
63106319
"provisioning"
63116320
]
@@ -6317,7 +6326,7 @@
63176326
"operationId": "RoutePutTemplate",
63186327
"parameters": [
63196328
{
6320-
"description": "Template Name",
6329+
"description": "Template group name",
63216330
"in": "path",
63226331
"name": "name",
63236332
"required": true,
@@ -6356,7 +6365,7 @@
63566365
}
63576366
}
63586367
},
6359-
"summary": "Updates an existing notification template.",
6368+
"summary": "Updates an existing notification template group.",
63606369
"tags": [
63616370
"provisioning"
63626371
]

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165
},
166166
"AlertRuleEditorSettings": {
167167
"properties": {
168+
"simplified_notifications_section": {
169+
"type": "boolean"
170+
},
168171
"simplified_query_and_expressions_section": {
169172
"type": "boolean"
170173
}
@@ -755,7 +758,7 @@
755758
"type": "string"
756759
},
757760
"ErrorSource": {
758-
"$ref": "#/definitions/ErrorSource"
761+
"$ref": "#/definitions/Source"
759762
},
760763
"Frames": {
761764
"$ref": "#/definitions/Frames"
@@ -965,10 +968,6 @@
965968
},
966969
"type": "object"
967970
},
968-
"ErrorSource": {
969-
"description": "ErrorSource type defines the source of the error",
970-
"type": "string"
971-
},
972971
"ErrorType": {
973972
"title": "ErrorType models the different API error types.",
974973
"type": "string"
@@ -3606,6 +3605,9 @@
36063605
},
36073606
"RuleDiscovery": {
36083607
"properties": {
3608+
"groupNextToken": {
3609+
"type": "string"
3610+
},
36093611
"groups": {
36103612
"items": {
36113613
"$ref": "#/definitions/RuleGroup"
@@ -3975,6 +3977,10 @@
39753977
"SmtpNotEnabled": {
39763978
"$ref": "#/definitions/ResponseDetails"
39773979
},
3980+
"Source": {
3981+
"title": "Source type defines the status source.",
3982+
"type": "string"
3983+
},
39783984
"Span": {
39793985
"properties": {
39803986
"Length": {
@@ -4641,6 +4647,7 @@
46414647
"type": "object"
46424648
},
46434649
"alertGroups": {
4650+
"description": "AlertGroups alert groups",
46444651
"items": {
46454652
"$ref": "#/definitions/alertGroup",
46464653
"type": "object"
@@ -8452,7 +8459,7 @@
84528459
}
84538460
}
84548461
},
8455-
"summary": "Get all notification templates.",
8462+
"summary": "Get all notification template groups.",
84568463
"tags": [
84578464
"provisioning"
84588465
]
@@ -8463,7 +8470,7 @@
84638470
"operationId": "RouteDeleteTemplate",
84648471
"parameters": [
84658472
{
8466-
"description": "Template name",
8473+
"description": "Template group name",
84678474
"in": "path",
84688475
"name": "name",
84698476
"required": true,
@@ -8487,7 +8494,7 @@
84878494
}
84888495
}
84898496
},
8490-
"summary": "Delete a template.",
8497+
"summary": "Delete a notification template group.",
84918498
"tags": [
84928499
"provisioning"
84938500
]
@@ -8496,7 +8503,7 @@
84968503
"operationId": "RouteGetTemplate",
84978504
"parameters": [
84988505
{
8499-
"description": "Template Name",
8506+
"description": "Template group name",
85008507
"in": "path",
85018508
"name": "name",
85028509
"required": true,
@@ -8517,7 +8524,7 @@
85178524
}
85188525
}
85198526
},
8520-
"summary": "Get a notification template.",
8527+
"summary": "Get a notification template group.",
85218528
"tags": [
85228529
"provisioning"
85238530
]
@@ -8529,7 +8536,7 @@
85298536
"operationId": "RoutePutTemplate",
85308537
"parameters": [
85318538
{
8532-
"description": "Template Name",
8539+
"description": "Template group name",
85338540
"in": "path",
85348541
"name": "name",
85358542
"required": true,
@@ -8568,7 +8575,7 @@
85688575
}
85698576
}
85708577
},
8571-
"summary": "Updates an existing notification template.",
8578+
"summary": "Updates an existing notification template group.",
85728579
"tags": [
85738580
"provisioning"
85748581
]

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,7 +3306,7 @@
33063306
"provisioning",
33073307
"stable"
33083308
],
3309-
"summary": "Get all notification templates.",
3309+
"summary": "Get all notification template groups.",
33103310
"operationId": "RouteGetTemplates",
33113311
"responses": {
33123312
"200": {
@@ -3324,12 +3324,12 @@
33243324
"provisioning",
33253325
"stable"
33263326
],
3327-
"summary": "Get a notification template.",
3327+
"summary": "Get a notification template group.",
33283328
"operationId": "RouteGetTemplate",
33293329
"parameters": [
33303330
{
33313331
"type": "string",
3332-
"description": "Template Name",
3332+
"description": "Template group name",
33333333
"name": "name",
33343334
"in": "path",
33353335
"required": true
@@ -3358,12 +3358,12 @@
33583358
"provisioning",
33593359
"stable"
33603360
],
3361-
"summary": "Updates an existing notification template.",
3361+
"summary": "Updates an existing notification template group.",
33623362
"operationId": "RoutePutTemplate",
33633363
"parameters": [
33643364
{
33653365
"type": "string",
3366-
"description": "Template Name",
3366+
"description": "Template group name",
33673367
"name": "name",
33683368
"in": "path",
33693369
"required": true
@@ -3407,12 +3407,12 @@
34073407
"provisioning",
34083408
"stable"
34093409
],
3410-
"summary": "Delete a template.",
3410+
"summary": "Delete a notification template group.",
34113411
"operationId": "RouteDeleteTemplate",
34123412
"parameters": [
34133413
{
34143414
"type": "string",
3415-
"description": "Template name",
3415+
"description": "Template group name",
34163416
"name": "name",
34173417
"in": "path",
34183418
"required": true
@@ -3797,6 +3797,9 @@
37973797
"AlertRuleEditorSettings": {
37983798
"type": "object",
37993799
"properties": {
3800+
"simplified_notifications_section": {
3801+
"type": "boolean"
3802+
},
38003803
"simplified_query_and_expressions_section": {
38013804
"type": "boolean"
38023805
}
@@ -4388,7 +4391,7 @@
43884391
"type": "string"
43894392
},
43904393
"ErrorSource": {
4391-
"$ref": "#/definitions/ErrorSource"
4394+
"$ref": "#/definitions/Source"
43924395
},
43934396
"Frames": {
43944397
"$ref": "#/definitions/Frames"
@@ -4597,10 +4600,6 @@
45974600
}
45984601
}
45994602
},
4600-
"ErrorSource": {
4601-
"description": "ErrorSource type defines the source of the error",
4602-
"type": "string"
4603-
},
46044603
"ErrorType": {
46054604
"type": "string",
46064605
"title": "ErrorType models the different API error types."
@@ -7243,6 +7242,9 @@
72437242
"groups"
72447243
],
72457244
"properties": {
7245+
"groupNextToken": {
7246+
"type": "string"
7247+
},
72467248
"groups": {
72477249
"type": "array",
72487250
"items": {
@@ -7608,6 +7610,10 @@
76087610
"SmtpNotEnabled": {
76097611
"$ref": "#/definitions/ResponseDetails"
76107612
},
7613+
"Source": {
7614+
"type": "string",
7615+
"title": "Source type defines the status source."
7616+
},
76117617
"Span": {
76127618
"type": "object",
76137619
"title": "A Span defines a continuous sequence of buckets.",
@@ -8274,6 +8280,7 @@
82748280
}
82758281
},
82768282
"alertGroups": {
8283+
"description": "AlertGroups alert groups",
82778284
"type": "array",
82788285
"items": {
82798286
"type": "object",

0 commit comments

Comments
 (0)