Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 21aaf7a

Browse files
authoredJan 13, 2025
chore: update alerting swagger spec
1 parent ae9460b commit 21aaf7a

File tree

3 files changed

+60
-44
lines changed

3 files changed

+60
-44
lines changed
 

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

+20-14
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": {
@@ -4376,7 +4382,6 @@
43764382
"type": "object"
43774383
},
43784384
"URL": {
4379-
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
43804385
"properties": {
43814386
"ForceQuery": {
43824387
"type": "boolean"
@@ -4412,7 +4417,7 @@
44124417
"$ref": "#/definitions/Userinfo"
44134418
}
44144419
},
4415-
"title": "A URL represents a parsed URL (technically, a URI reference).",
4420+
"title": "URL is a custom URL type that allows validation at configuration load time.",
44164421
"type": "object"
44174422
},
44184423
"UpdateRuleGroupResponse": {
@@ -4642,6 +4647,7 @@
46424647
"type": "object"
46434648
},
46444649
"alertGroups": {
4650+
"description": "AlertGroups alert groups",
46454651
"items": {
46464652
"$ref": "#/definitions/alertGroup",
46474653
"type": "object"
@@ -6240,7 +6246,7 @@
62406246
}
62416247
}
62426248
},
6243-
"summary": "Get all notification templates.",
6249+
"summary": "Get all notification template groups.",
62446250
"tags": [
62456251
"provisioning"
62466252
]
@@ -6251,7 +6257,7 @@
62516257
"operationId": "RouteDeleteTemplate",
62526258
"parameters": [
62536259
{
6254-
"description": "Template name",
6260+
"description": "Template group name",
62556261
"in": "path",
62566262
"name": "name",
62576263
"required": true,
@@ -6275,7 +6281,7 @@
62756281
}
62766282
}
62776283
},
6278-
"summary": "Delete a template.",
6284+
"summary": "Delete a notification template group.",
62796285
"tags": [
62806286
"provisioning"
62816287
]
@@ -6284,7 +6290,7 @@
62846290
"operationId": "RouteGetTemplate",
62856291
"parameters": [
62866292
{
6287-
"description": "Template Name",
6293+
"description": "Template group name",
62886294
"in": "path",
62896295
"name": "name",
62906296
"required": true,
@@ -6305,7 +6311,7 @@
63056311
}
63066312
}
63076313
},
6308-
"summary": "Get a notification template.",
6314+
"summary": "Get a notification template group.",
63096315
"tags": [
63106316
"provisioning"
63116317
]
@@ -6317,7 +6323,7 @@
63176323
"operationId": "RoutePutTemplate",
63186324
"parameters": [
63196325
{
6320-
"description": "Template Name",
6326+
"description": "Template group name",
63216327
"in": "path",
63226328
"name": "name",
63236329
"required": true,
@@ -6356,7 +6362,7 @@
63566362
}
63576363
}
63586364
},
6359-
"summary": "Updates an existing notification template.",
6365+
"summary": "Updates an existing notification template group.",
63606366
"tags": [
63616367
"provisioning"
63626368
]

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

+20-15
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": {
@@ -4376,6 +4382,7 @@
43764382
"type": "object"
43774383
},
43784384
"URL": {
4385+
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
43794386
"properties": {
43804387
"ForceQuery": {
43814388
"type": "boolean"
@@ -4411,7 +4418,7 @@
44114418
"$ref": "#/definitions/Userinfo"
44124419
}
44134420
},
4414-
"title": "URL is a custom URL type that allows validation at configuration load time.",
4421+
"title": "A URL represents a parsed URL (technically, a URI reference).",
44154422
"type": "object"
44164423
},
44174424
"UpdateRuleGroupResponse": {
@@ -4802,7 +4809,6 @@
48024809
"type": "object"
48034810
},
48044811
"gettableAlerts": {
4805-
"description": "GettableAlerts gettable alerts",
48064812
"items": {
48074813
"$ref": "#/definitions/gettableAlert",
48084814
"type": "object"
@@ -4927,7 +4933,6 @@
49274933
"type": "object"
49284934
},
49294935
"gettableSilences": {
4930-
"description": "GettableSilences gettable silences",
49314936
"items": {
49324937
"$ref": "#/definitions/gettableSilence",
49334938
"type": "object"
@@ -8452,7 +8457,7 @@
84528457
}
84538458
}
84548459
},
8455-
"summary": "Get all notification templates.",
8460+
"summary": "Get all notification template groups.",
84568461
"tags": [
84578462
"provisioning"
84588463
]
@@ -8463,7 +8468,7 @@
84638468
"operationId": "RouteDeleteTemplate",
84648469
"parameters": [
84658470
{
8466-
"description": "Template name",
8471+
"description": "Template group name",
84678472
"in": "path",
84688473
"name": "name",
84698474
"required": true,
@@ -8487,7 +8492,7 @@
84878492
}
84888493
}
84898494
},
8490-
"summary": "Delete a template.",
8495+
"summary": "Delete a notification template group.",
84918496
"tags": [
84928497
"provisioning"
84938498
]
@@ -8496,7 +8501,7 @@
84968501
"operationId": "RouteGetTemplate",
84978502
"parameters": [
84988503
{
8499-
"description": "Template Name",
8504+
"description": "Template group name",
85008505
"in": "path",
85018506
"name": "name",
85028507
"required": true,
@@ -8517,7 +8522,7 @@
85178522
}
85188523
}
85198524
},
8520-
"summary": "Get a notification template.",
8525+
"summary": "Get a notification template group.",
85218526
"tags": [
85228527
"provisioning"
85238528
]
@@ -8529,7 +8534,7 @@
85298534
"operationId": "RoutePutTemplate",
85308535
"parameters": [
85318536
{
8532-
"description": "Template Name",
8537+
"description": "Template group name",
85338538
"in": "path",
85348539
"name": "name",
85358540
"required": true,
@@ -8568,7 +8573,7 @@
85688573
}
85698574
}
85708575
},
8571-
"summary": "Updates an existing notification template.",
8576+
"summary": "Updates an existing notification template group.",
85728577
"tags": [
85738578
"provisioning"
85748579
]

0 commit comments

Comments
 (0)
Please sign in to comment.