Skip to content

Commit

Permalink
chore: update alerting swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dhia-gharsallaoui authored Dec 16, 2024
1 parent ae9460b commit f9ead74
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 38 deletions.
34 changes: 20 additions & 14 deletions pkg/services/ngalert/api/tooling/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
},
"AlertRuleEditorSettings": {
"properties": {
"simplified_notifications_section": {
"type": "boolean"
},
"simplified_query_and_expressions_section": {
"type": "boolean"
}
Expand Down Expand Up @@ -755,7 +758,7 @@
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
"$ref": "#/definitions/Source"
},
"Frames": {
"$ref": "#/definitions/Frames"
Expand Down Expand Up @@ -965,10 +968,6 @@
},
"type": "object"
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"title": "ErrorType models the different API error types.",
"type": "string"
Expand Down Expand Up @@ -3606,6 +3605,9 @@
},
"RuleDiscovery": {
"properties": {
"groupNextToken": {
"type": "string"
},
"groups": {
"items": {
"$ref": "#/definitions/RuleGroup"
Expand Down Expand Up @@ -3975,6 +3977,10 @@
"SmtpNotEnabled": {
"$ref": "#/definitions/ResponseDetails"
},
"Source": {
"title": "Source type defines the status source.",
"type": "string"
},
"Span": {
"properties": {
"Length": {
Expand Down Expand Up @@ -4376,7 +4382,6 @@
"type": "object"
},
"URL": {
"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.",
"properties": {
"ForceQuery": {
"type": "boolean"
Expand Down Expand Up @@ -4412,7 +4417,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"UpdateRuleGroupResponse": {
Expand Down Expand Up @@ -4642,6 +4647,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup",
"type": "object"
Expand Down Expand Up @@ -6240,7 +6246,7 @@
}
}
},
"summary": "Get all notification templates.",
"summary": "Get all notification template groups.",
"tags": [
"provisioning"
]
Expand All @@ -6251,7 +6257,7 @@
"operationId": "RouteDeleteTemplate",
"parameters": [
{
"description": "Template name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -6275,7 +6281,7 @@
}
}
},
"summary": "Delete a template.",
"summary": "Delete a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -6284,7 +6290,7 @@
"operationId": "RouteGetTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -6305,7 +6311,7 @@
}
}
},
"summary": "Get a notification template.",
"summary": "Get a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -6317,7 +6323,7 @@
"operationId": "RoutePutTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand Down Expand Up @@ -6356,7 +6362,7 @@
}
}
},
"summary": "Updates an existing notification template.",
"summary": "Updates an existing notification template group.",
"tags": [
"provisioning"
]
Expand Down
30 changes: 18 additions & 12 deletions pkg/services/ngalert/api/tooling/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
},
"AlertRuleEditorSettings": {
"properties": {
"simplified_notifications_section": {
"type": "boolean"
},
"simplified_query_and_expressions_section": {
"type": "boolean"
}
Expand Down Expand Up @@ -755,7 +758,7 @@
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
"$ref": "#/definitions/Source"
},
"Frames": {
"$ref": "#/definitions/Frames"
Expand Down Expand Up @@ -965,10 +968,6 @@
},
"type": "object"
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"title": "ErrorType models the different API error types.",
"type": "string"
Expand Down Expand Up @@ -3606,6 +3605,9 @@
},
"RuleDiscovery": {
"properties": {
"groupNextToken": {
"type": "string"
},
"groups": {
"items": {
"$ref": "#/definitions/RuleGroup"
Expand Down Expand Up @@ -3975,6 +3977,10 @@
"SmtpNotEnabled": {
"$ref": "#/definitions/ResponseDetails"
},
"Source": {
"title": "Source type defines the status source.",
"type": "string"
},
"Span": {
"properties": {
"Length": {
Expand Down Expand Up @@ -8452,7 +8458,7 @@
}
}
},
"summary": "Get all notification templates.",
"summary": "Get all notification template groups.",
"tags": [
"provisioning"
]
Expand All @@ -8463,7 +8469,7 @@
"operationId": "RouteDeleteTemplate",
"parameters": [
{
"description": "Template name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -8487,7 +8493,7 @@
}
}
},
"summary": "Delete a template.",
"summary": "Delete a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -8496,7 +8502,7 @@
"operationId": "RouteGetTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -8517,7 +8523,7 @@
}
}
},
"summary": "Get a notification template.",
"summary": "Get a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -8529,7 +8535,7 @@
"operationId": "RoutePutTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand Down Expand Up @@ -8568,7 +8574,7 @@
}
}
},
"summary": "Updates an existing notification template.",
"summary": "Updates an existing notification template group.",
"tags": [
"provisioning"
]
Expand Down
30 changes: 18 additions & 12 deletions pkg/services/ngalert/api/tooling/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@
"provisioning",
"stable"
],
"summary": "Get all notification templates.",
"summary": "Get all notification template groups.",
"operationId": "RouteGetTemplates",
"responses": {
"200": {
Expand All @@ -3324,12 +3324,12 @@
"provisioning",
"stable"
],
"summary": "Get a notification template.",
"summary": "Get a notification template group.",
"operationId": "RouteGetTemplate",
"parameters": [
{
"type": "string",
"description": "Template Name",
"description": "Template group name",
"name": "name",
"in": "path",
"required": true
Expand Down Expand Up @@ -3358,12 +3358,12 @@
"provisioning",
"stable"
],
"summary": "Updates an existing notification template.",
"summary": "Updates an existing notification template group.",
"operationId": "RoutePutTemplate",
"parameters": [
{
"type": "string",
"description": "Template Name",
"description": "Template group name",
"name": "name",
"in": "path",
"required": true
Expand Down Expand Up @@ -3407,12 +3407,12 @@
"provisioning",
"stable"
],
"summary": "Delete a template.",
"summary": "Delete a notification template group.",
"operationId": "RouteDeleteTemplate",
"parameters": [
{
"type": "string",
"description": "Template name",
"description": "Template group name",
"name": "name",
"in": "path",
"required": true
Expand Down Expand Up @@ -3797,6 +3797,9 @@
"AlertRuleEditorSettings": {
"type": "object",
"properties": {
"simplified_notifications_section": {
"type": "boolean"
},
"simplified_query_and_expressions_section": {
"type": "boolean"
}
Expand Down Expand Up @@ -4388,7 +4391,7 @@
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
"$ref": "#/definitions/Source"
},
"Frames": {
"$ref": "#/definitions/Frames"
Expand Down Expand Up @@ -4597,10 +4600,6 @@
}
}
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"type": "string",
"title": "ErrorType models the different API error types."
Expand Down Expand Up @@ -7243,6 +7242,9 @@
"groups"
],
"properties": {
"groupNextToken": {
"type": "string"
},
"groups": {
"type": "array",
"items": {
Expand Down Expand Up @@ -7608,6 +7610,10 @@
"SmtpNotEnabled": {
"$ref": "#/definitions/ResponseDetails"
},
"Source": {
"type": "string",
"title": "Source type defines the status source."
},
"Span": {
"type": "object",
"title": "A Span defines a continuous sequence of buckets.",
Expand Down

0 comments on commit f9ead74

Please sign in to comment.