Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alerting: Update Swagger spec #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 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 @@ -4803,6 +4808,7 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert",
"type": "object"
Expand Down Expand Up @@ -4927,6 +4933,7 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence",
"type": "object"
Expand Down Expand Up @@ -6240,7 +6247,7 @@
}
}
},
"summary": "Get all notification templates.",
"summary": "Get all notification template groups.",
"tags": [
"provisioning"
]
Expand All @@ -6251,7 +6258,7 @@
"operationId": "RouteDeleteTemplate",
"parameters": [
{
"description": "Template name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -6275,7 +6282,7 @@
}
}
},
"summary": "Delete a template.",
"summary": "Delete a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -6284,7 +6291,7 @@
"operationId": "RouteGetTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -6305,7 +6312,7 @@
}
}
},
"summary": "Get a notification template.",
"summary": "Get a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -6317,7 +6324,7 @@
"operationId": "RoutePutTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand Down Expand Up @@ -6356,7 +6363,7 @@
}
}
},
"summary": "Updates an existing notification template.",
"summary": "Updates an existing notification template group.",
"tags": [
"provisioning"
]
Expand Down
34 changes: 20 additions & 14 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 @@ -4376,6 +4382,7 @@
"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 @@ -4411,7 +4418,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"type": "object"
},
"UpdateRuleGroupResponse": {
Expand Down Expand Up @@ -4927,7 +4934,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence",
"type": "object"
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
Loading