Skip to content

Commit e389211

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

File tree

3 files changed

+59
-38
lines changed

3 files changed

+59
-38
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 & 13 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"
@@ -4927,7 +4934,6 @@
49274934
"type": "object"
49284935
},
49294936
"gettableSilences": {
4930-
"description": "GettableSilences gettable silences",
49314937
"items": {
49324938
"$ref": "#/definitions/gettableSilence",
49334939
"type": "object"
@@ -8452,7 +8458,7 @@
84528458
}
84538459
}
84548460
},
8455-
"summary": "Get all notification templates.",
8461+
"summary": "Get all notification template groups.",
84568462
"tags": [
84578463
"provisioning"
84588464
]
@@ -8463,7 +8469,7 @@
84638469
"operationId": "RouteDeleteTemplate",
84648470
"parameters": [
84658471
{
8466-
"description": "Template name",
8472+
"description": "Template group name",
84678473
"in": "path",
84688474
"name": "name",
84698475
"required": true,
@@ -8487,7 +8493,7 @@
84878493
}
84888494
}
84898495
},
8490-
"summary": "Delete a template.",
8496+
"summary": "Delete a notification template group.",
84918497
"tags": [
84928498
"provisioning"
84938499
]
@@ -8496,7 +8502,7 @@
84968502
"operationId": "RouteGetTemplate",
84978503
"parameters": [
84988504
{
8499-
"description": "Template Name",
8505+
"description": "Template group name",
85008506
"in": "path",
85018507
"name": "name",
85028508
"required": true,
@@ -8517,7 +8523,7 @@
85178523
}
85188524
}
85198525
},
8520-
"summary": "Get a notification template.",
8526+
"summary": "Get a notification template group.",
85218527
"tags": [
85228528
"provisioning"
85238529
]
@@ -8529,7 +8535,7 @@
85298535
"operationId": "RoutePutTemplate",
85308536
"parameters": [
85318537
{
8532-
"description": "Template Name",
8538+
"description": "Template group name",
85338539
"in": "path",
85348540
"name": "name",
85358541
"required": true,
@@ -8568,7 +8574,7 @@
85688574
}
85698575
}
85708576
},
8571-
"summary": "Updates an existing notification template.",
8577+
"summary": "Updates an existing notification template group.",
85728578
"tags": [
85738579
"provisioning"
85748580
]

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

Lines changed: 19 additions & 13 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",
@@ -8560,7 +8567,6 @@
85608567
}
85618568
},
85628569
"gettableSilences": {
8563-
"description": "GettableSilences gettable silences",
85648570
"type": "array",
85658571
"items": {
85668572
"type": "object",

0 commit comments

Comments
 (0)