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
31 changes: 19 additions & 12 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 @@ -4803,6 +4809,7 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert",
"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
32 changes: 18 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 @@ -4802,7 +4808,6 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert",
"type": "object"
Expand Down Expand Up @@ -4927,7 +4932,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence",
"type": "object"
Expand Down Expand Up @@ -8452,7 +8456,7 @@
}
}
},
"summary": "Get all notification templates.",
"summary": "Get all notification template groups.",
"tags": [
"provisioning"
]
Expand All @@ -8463,7 +8467,7 @@
"operationId": "RouteDeleteTemplate",
"parameters": [
{
"description": "Template name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -8487,7 +8491,7 @@
}
}
},
"summary": "Delete a template.",
"summary": "Delete a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -8496,7 +8500,7 @@
"operationId": "RouteGetTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand All @@ -8517,7 +8521,7 @@
}
}
},
"summary": "Get a notification template.",
"summary": "Get a notification template group.",
"tags": [
"provisioning"
]
Expand All @@ -8529,7 +8533,7 @@
"operationId": "RoutePutTemplate",
"parameters": [
{
"description": "Template Name",
"description": "Template group name",
"in": "path",
"name": "name",
"required": true,
Expand Down Expand Up @@ -8568,7 +8572,7 @@
}
}
},
"summary": "Updates an existing notification template.",
"summary": "Updates an existing notification template group.",
"tags": [
"provisioning"
]
Expand Down
32 changes: 18 additions & 14 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 Expand Up @@ -8435,7 +8441,6 @@
}
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"type": "object",
Expand Down Expand Up @@ -8560,7 +8565,6 @@
}
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"type": "object",
Expand Down