Alerting: Fix rendering issues in OpenAPI docs (#50630)

* Clean up status codes

* Missing consumes tag

* Regenerate

* Fix incorrect documented responses and missing UI elements

* Fix response docs

* Fix wrong response copy paste

* Regenerate

* Temporarily revert
pull/50723/head
Alexander Weaver 3 years ago committed by GitHub
parent 9779f684d1
commit 17e76b06ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 868
      pkg/services/ngalert/api/tooling/api.json
  2. 5
      pkg/services/ngalert/api/tooling/definitions/api.go
  3. 7
      pkg/services/ngalert/api/tooling/definitions/provisioning_alert_rules.go
  4. 14
      pkg/services/ngalert/api/tooling/definitions/provisioning_contactpoints.go
  5. 7
      pkg/services/ngalert/api/tooling/definitions/provisioning_mute_timings.go
  6. 3
      pkg/services/ngalert/api/tooling/definitions/provisioning_policies.go
  7. 16
      pkg/services/ngalert/api/tooling/definitions/provisioning_templates.go
  8. 6
      pkg/services/ngalert/api/tooling/definitions/shared.go
  9. 147
      pkg/services/ngalert/api/tooling/post.json
  10. 141
      pkg/services/ngalert/api/tooling/spec.json

File diff suppressed because it is too large Load Diff

@ -24,11 +24,6 @@
// swagger:meta // swagger:meta
package definitions package definitions
// swagger:model
type ValidationError struct {
Msg string `json:"msg"`
}
type Backend int type Backend int
const ( const (

@ -12,12 +12,15 @@ import (
// //
// Responses: // Responses:
// 200: AlertRule // 200: AlertRule
// 400: ValidationError // 404: description: Not found.
// swagger:route POST /api/v1/provisioning/alert-rules provisioning stable RoutePostAlertRule // swagger:route POST /api/v1/provisioning/alert-rules provisioning stable RoutePostAlertRule
// //
// Create a new alert rule. // Create a new alert rule.
// //
// Consumes:
// - application/json
//
// Responses: // Responses:
// 201: AlertRule // 201: AlertRule
// 400: ValidationError // 400: ValidationError
@ -39,10 +42,10 @@ import (
// //
// Responses: // Responses:
// 204: description: The alert rule was deleted successfully. // 204: description: The alert rule was deleted successfully.
// 400: ValidationError
// swagger:parameters RouteGetAlertRule RoutePutAlertRule RouteDeleteAlertRule // swagger:parameters RouteGetAlertRule RoutePutAlertRule RouteDeleteAlertRule
type AlertRuleUIDReference struct { type AlertRuleUIDReference struct {
// Alert rule UID
// in:path // in:path
UID string UID string
} }

@ -12,8 +12,7 @@ import (
// Get all the contact points. // Get all the contact points.
// //
// Responses: // Responses:
// 200: Route // 200: ContactPoints
// 400: ValidationError
// swagger:route POST /api/v1/provisioning/contact-points provisioning stable RoutePostContactpoints // swagger:route POST /api/v1/provisioning/contact-points provisioning stable RoutePostContactpoints
// //
@ -23,7 +22,7 @@ import (
// - application/json // - application/json
// //
// Responses: // Responses:
// 202: Ack // 202: EmbeddedContactPoint
// 400: ValidationError // 400: ValidationError
// swagger:route PUT /api/v1/provisioning/contact-points/{UID} provisioning stable RoutePutContactpoint // swagger:route PUT /api/v1/provisioning/contact-points/{UID} provisioning stable RoutePutContactpoint
@ -45,12 +44,11 @@ import (
// - application/json // - application/json
// //
// Responses: // Responses:
// 202: Ack // 204: description: The contact point was deleted successfully.
// 400: ValidationError
// swagger:parameters RoutePutContactpoint RouteDeleteContactpoints // swagger:parameters RoutePutContactpoint RouteDeleteContactpoints
type ContactPointUIDReference struct { type ContactPointUIDReference struct {
// UID should be the contact point unique identifier // UID is the contact point unique identifier
// in:path // in:path
UID string UID string
} }
@ -61,8 +59,12 @@ type ContactPointPayload struct {
Body EmbeddedContactPoint Body EmbeddedContactPoint
} }
// swagger:model
type ContactPoints []EmbeddedContactPoint
// EmbeddedContactPoint is the contact point type that is used // EmbeddedContactPoint is the contact point type that is used
// by grafanas embedded alertmanager implementation. // by grafanas embedded alertmanager implementation.
// swagger:model
type EmbeddedContactPoint struct { type EmbeddedContactPoint struct {
// UID is the unique identifier of the contact point. The UID can be // UID is the unique identifier of the contact point. The UID can be
// set by the user. // set by the user.

@ -11,7 +11,6 @@ import (
// //
// Responses: // Responses:
// 200: MuteTimings // 200: MuteTimings
// 400: ValidationError
// swagger:route GET /api/v1/provisioning/mute-timings/{name} provisioning stable RouteGetMuteTiming // swagger:route GET /api/v1/provisioning/mute-timings/{name} provisioning stable RouteGetMuteTiming
// //
@ -19,7 +18,7 @@ import (
// //
// Responses: // Responses:
// 200: MuteTimeInterval // 200: MuteTimeInterval
// 400: ValidationError // 404: description: Not found.
// swagger:route POST /api/v1/provisioning/mute-timings provisioning stable RoutePostMuteTiming // swagger:route POST /api/v1/provisioning/mute-timings provisioning stable RoutePostMuteTiming
// //
@ -48,7 +47,7 @@ import (
// Delete a mute timing. // Delete a mute timing.
// //
// Responses: // Responses:
// 204: Ack // 204: description: The mute timing was deleted successfully.
// swagger:route // swagger:route
@ -57,7 +56,7 @@ type MuteTimings []MuteTimeInterval
// swagger:parameters RouteGetTemplate RouteGetMuteTiming RoutePutMuteTiming stable RouteDeleteMuteTiming // swagger:parameters RouteGetTemplate RouteGetMuteTiming RoutePutMuteTiming stable RouteDeleteMuteTiming
type RouteGetMuteTimingParam struct { type RouteGetMuteTimingParam struct {
// Template Name // Mute timing name
// in:path // in:path
Name string `json:"name"` Name string `json:"name"`
} }

@ -6,7 +6,7 @@ package definitions
// //
// Responses: // Responses:
// 200: Route // 200: Route
// 400: ValidationError // description: The currently active notification routing tree
// swagger:route PUT /api/v1/provisioning/policies provisioning stable RoutePutPolicyTree // swagger:route PUT /api/v1/provisioning/policies provisioning stable RoutePutPolicyTree
// //
@ -21,6 +21,7 @@ package definitions
// swagger:parameters RoutePutPolicyTree // swagger:parameters RoutePutPolicyTree
type Policytree struct { type Policytree struct {
// The new notification routing tree to use
// in:body // in:body
Body Route Body Route
} }

@ -9,8 +9,8 @@ import (
// Get all message templates. // Get all message templates.
// //
// Responses: // Responses:
// 200: MessageTemplate // 200: MessageTemplates
// 400: ValidationError // 404: description: Not found.
// swagger:route GET /api/v1/provisioning/templates/{name} provisioning stable RouteGetTemplate // swagger:route GET /api/v1/provisioning/templates/{name} provisioning stable RouteGetTemplate
// //
@ -18,7 +18,7 @@ import (
// //
// Responses: // Responses:
// 200: MessageTemplate // 200: MessageTemplate
// 404: NotFound // 404: description: Not found.
// swagger:route PUT /api/v1/provisioning/templates/{name} provisioning stable RoutePutTemplate // swagger:route PUT /api/v1/provisioning/templates/{name} provisioning stable RoutePutTemplate
// //
@ -28,7 +28,7 @@ import (
// - application/json // - application/json
// //
// Responses: // Responses:
// 202: Ack // 202: MessageTemplate
// 400: ValidationError // 400: ValidationError
// swagger:route DELETE /api/v1/provisioning/templates/{name} provisioning stable RouteDeleteTemplate // swagger:route DELETE /api/v1/provisioning/templates/{name} provisioning stable RouteDeleteTemplate
@ -36,7 +36,7 @@ import (
// Delete a template. // Delete a template.
// //
// Responses: // Responses:
// 204: Ack // 204: description: The template was deleted successfully.
// swagger:parameters RouteGetTemplate RoutePutTemplate RouteDeleteTemplate // swagger:parameters RouteGetTemplate RoutePutTemplate RouteDeleteTemplate
type RouteGetTemplateParam struct { type RouteGetTemplateParam struct {
@ -47,8 +47,8 @@ type RouteGetTemplateParam struct {
// swagger:model // swagger:model
type MessageTemplate struct { type MessageTemplate struct {
Name string Name string `json:"name"`
Template string Template string `json:"template"`
Provenance models.Provenance `json:"provenance,omitempty"` Provenance models.Provenance `json:"provenance,omitempty"`
} }
@ -56,7 +56,7 @@ type MessageTemplate struct {
type MessageTemplates []MessageTemplate type MessageTemplates []MessageTemplate
type MessageTemplateContent struct { type MessageTemplateContent struct {
Template string Template string `json:"template"`
} }
// swagger:parameters RoutePutTemplate // swagger:parameters RoutePutTemplate

@ -5,3 +5,9 @@ type NotFound struct{}
// swagger:model // swagger:model
type Ack struct{} type Ack struct{}
// swagger:model
type ValidationError struct {
// example: error message
Msg string `json:"msg"`
}

@ -539,6 +539,13 @@
"type": "object", "type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
}, },
"ContactPoints": {
"items": {
"$ref": "#/definitions/EmbeddedContactPoint"
},
"type": "array",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"CreateDashboardSnapshotCommand": { "CreateDashboardSnapshotCommand": {
"properties": { "properties": {
"Result": { "Result": {
@ -1581,14 +1588,16 @@
}, },
"MessageTemplate": { "MessageTemplate": {
"properties": { "properties": {
"Name": { "name": {
"type": "string" "type": "string",
}, "x-go-name": "Name"
"Template": {
"type": "string"
}, },
"provenance": { "provenance": {
"$ref": "#/definitions/Provenance" "$ref": "#/definitions/Provenance"
},
"template": {
"type": "string",
"x-go-name": "Template"
} }
}, },
"type": "object", "type": "object",
@ -1596,8 +1605,9 @@
}, },
"MessageTemplateContent": { "MessageTemplateContent": {
"properties": { "properties": {
"Template": { "template": {
"type": "string" "type": "string",
"x-go-name": "Template"
} }
}, },
"type": "object", "type": "object",
@ -3176,6 +3186,7 @@
"ValidationError": { "ValidationError": {
"properties": { "properties": {
"msg": { "msg": {
"example": "error message",
"type": "string", "type": "string",
"x-go-name": "Msg" "x-go-name": "Msg"
} }
@ -3513,6 +3524,7 @@
"$ref": "#/definitions/Duration" "$ref": "#/definitions/Duration"
}, },
"gettableAlert": { "gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": { "properties": {
"annotations": { "annotations": {
"$ref": "#/definitions/labelSet" "$ref": "#/definitions/labelSet"
@ -3571,16 +3583,15 @@
"status", "status",
"updatedAt" "updatedAt"
], ],
"type": "object", "type": "object"
"x-go-name": "GettableAlert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}, },
"gettableAlerts": { "gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": { "items": {
"$ref": "#/definitions/gettableAlert" "$ref": "#/definitions/gettableAlert"
}, },
"type": "array" "type": "array",
"x-go-name": "GettableAlerts",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}, },
"gettableSilence": { "gettableSilence": {
"properties": { "properties": {
@ -3639,11 +3650,12 @@
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models" "x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}, },
"gettableSilences": { "gettableSilences": {
"description": "GettableSilences gettable silences",
"items": { "items": {
"$ref": "#/definitions/gettableSilence" "$ref": "#/definitions/gettableSilence"
}, },
"type": "array" "type": "array",
"x-go-name": "GettableSilences",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}, },
"labelSet": { "labelSet": {
"additionalProperties": { "additionalProperties": {
@ -3815,6 +3827,7 @@
"type": "object" "type": "object"
}, },
"receiver": { "receiver": {
"description": "Receiver receiver",
"properties": { "properties": {
"name": { "name": {
"description": "name", "description": "name",
@ -3825,9 +3838,7 @@
"required": [ "required": [
"name" "name"
], ],
"type": "object", "type": "object"
"x-go-name": "Receiver",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}, },
"silence": { "silence": {
"description": "Silence silence", "description": "Silence silence",
@ -5593,6 +5604,9 @@
}, },
"/api/v1/provisioning/alert-rules": { "/api/v1/provisioning/alert-rules": {
"post": { "post": {
"consumes": [
"application/json"
],
"operationId": "RoutePostAlertRule", "operationId": "RoutePostAlertRule",
"parameters": [ "parameters": [
{ {
@ -5628,6 +5642,7 @@
"operationId": "RouteDeleteAlertRule", "operationId": "RouteDeleteAlertRule",
"parameters": [ "parameters": [
{ {
"description": "Alert rule UID",
"in": "path", "in": "path",
"name": "UID", "name": "UID",
"required": true, "required": true,
@ -5637,12 +5652,6 @@
"responses": { "responses": {
"204": { "204": {
"description": " The alert rule was deleted successfully." "description": " The alert rule was deleted successfully."
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Delete a specific alert rule by UID.", "summary": "Delete a specific alert rule by UID.",
@ -5654,6 +5663,7 @@
"operationId": "RouteGetAlertRule", "operationId": "RouteGetAlertRule",
"parameters": [ "parameters": [
{ {
"description": "Alert rule UID",
"in": "path", "in": "path",
"name": "UID", "name": "UID",
"required": true, "required": true,
@ -5667,11 +5677,8 @@
"$ref": "#/definitions/AlertRule" "$ref": "#/definitions/AlertRule"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Get a specific alert rule by UID.", "summary": "Get a specific alert rule by UID.",
@ -5686,6 +5693,7 @@
"operationId": "RoutePutAlertRule", "operationId": "RoutePutAlertRule",
"parameters": [ "parameters": [
{ {
"description": "Alert rule UID",
"in": "path", "in": "path",
"name": "UID", "name": "UID",
"required": true, "required": true,
@ -5724,15 +5732,9 @@
"operationId": "RouteGetContactpoints", "operationId": "RouteGetContactpoints",
"responses": { "responses": {
"200": { "200": {
"description": "Route", "description": "ContactPoints",
"schema": { "schema": {
"$ref": "#/definitions/Route" "$ref": "#/definitions/ContactPoints"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
} }
} }
}, },
@ -5757,9 +5759,9 @@
], ],
"responses": { "responses": {
"202": { "202": {
"description": "Ack", "description": "EmbeddedContactPoint",
"schema": { "schema": {
"$ref": "#/definitions/Ack" "$ref": "#/definitions/EmbeddedContactPoint"
} }
}, },
"400": { "400": {
@ -5791,17 +5793,8 @@
} }
], ],
"responses": { "responses": {
"202": { "204": {
"description": "Ack", "description": " The contact point was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Delete a contact point.", "summary": "Delete a contact point.",
@ -5906,12 +5899,6 @@
"schema": { "schema": {
"$ref": "#/definitions/MuteTimings" "$ref": "#/definitions/MuteTimings"
} }
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Get all the mute timings.", "summary": "Get all the mute timings.",
@ -5958,7 +5945,7 @@
"operationId": "RouteDeleteMuteTiming", "operationId": "RouteDeleteMuteTiming",
"parameters": [ "parameters": [
{ {
"description": "Template Name", "description": "Mute timing name",
"in": "path", "in": "path",
"name": "name", "name": "name",
"required": true, "required": true,
@ -5968,10 +5955,7 @@
], ],
"responses": { "responses": {
"204": { "204": {
"description": "Ack", "description": " The mute timing was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
} }
}, },
"summary": "Delete a mute timing.", "summary": "Delete a mute timing.",
@ -5983,7 +5967,7 @@
"operationId": "RouteGetMuteTiming", "operationId": "RouteGetMuteTiming",
"parameters": [ "parameters": [
{ {
"description": "Template Name", "description": "Mute timing name",
"in": "path", "in": "path",
"name": "name", "name": "name",
"required": true, "required": true,
@ -5998,11 +5982,8 @@
"$ref": "#/definitions/MuteTimeInterval" "$ref": "#/definitions/MuteTimeInterval"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Get a mute timing.", "summary": "Get a mute timing.",
@ -6017,7 +5998,7 @@
"operationId": "RoutePutMuteTiming", "operationId": "RoutePutMuteTiming",
"parameters": [ "parameters": [
{ {
"description": "Template Name", "description": "Mute timing name",
"in": "path", "in": "path",
"name": "name", "name": "name",
"required": true, "required": true,
@ -6061,12 +6042,6 @@
"schema": { "schema": {
"$ref": "#/definitions/Route" "$ref": "#/definitions/Route"
} }
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Get the notification policy tree.", "summary": "Get the notification policy tree.",
@ -6081,6 +6056,7 @@
"operationId": "RoutePutPolicyTree", "operationId": "RoutePutPolicyTree",
"parameters": [ "parameters": [
{ {
"description": "The new notification routing tree to use",
"in": "body", "in": "body",
"name": "Body", "name": "Body",
"schema": { "schema": {
@ -6113,16 +6089,13 @@
"operationId": "RouteGetTemplates", "operationId": "RouteGetTemplates",
"responses": { "responses": {
"200": { "200": {
"description": "MessageTemplate", "description": "MessageTemplates",
"schema": { "schema": {
"$ref": "#/definitions/MessageTemplate" "$ref": "#/definitions/MessageTemplates"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
}, },
"summary": "Get all message templates.", "summary": "Get all message templates.",
@ -6146,10 +6119,7 @@
], ],
"responses": { "responses": {
"204": { "204": {
"description": "Ack", "description": " The template was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
} }
}, },
"summary": "Delete a template.", "summary": "Delete a template.",
@ -6177,10 +6147,7 @@
} }
}, },
"404": { "404": {
"description": "NotFound", "description": " Not found."
"schema": {
"$ref": "#/definitions/NotFound"
}
} }
}, },
"summary": "Get a message template.", "summary": "Get a message template.",
@ -6212,9 +6179,9 @@
], ],
"responses": { "responses": {
"202": { "202": {
"description": "Ack", "description": "MessageTemplate",
"schema": { "schema": {
"$ref": "#/definitions/Ack" "$ref": "#/definitions/MessageTemplate"
} }
}, },
"400": { "400": {

@ -1669,6 +1669,9 @@
}, },
"/api/v1/provisioning/alert-rules": { "/api/v1/provisioning/alert-rules": {
"post": { "post": {
"consumes": [
"application/json"
],
"tags": [ "tags": [
"provisioning", "provisioning",
"stable" "stable"
@ -1711,6 +1714,7 @@
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
"description": "Alert rule UID",
"name": "UID", "name": "UID",
"in": "path", "in": "path",
"required": true "required": true
@ -1723,11 +1727,8 @@
"$ref": "#/definitions/AlertRule" "$ref": "#/definitions/AlertRule"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
}, },
@ -1744,6 +1745,7 @@
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
"description": "Alert rule UID",
"name": "UID", "name": "UID",
"in": "path", "in": "path",
"required": true "required": true
@ -1781,6 +1783,7 @@
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
"description": "Alert rule UID",
"name": "UID", "name": "UID",
"in": "path", "in": "path",
"required": true "required": true
@ -1789,12 +1792,6 @@
"responses": { "responses": {
"204": { "204": {
"description": " The alert rule was deleted successfully." "description": " The alert rule was deleted successfully."
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
} }
@ -1809,15 +1806,9 @@
"operationId": "RouteGetContactpoints", "operationId": "RouteGetContactpoints",
"responses": { "responses": {
"200": { "200": {
"description": "Route", "description": "ContactPoints",
"schema": { "schema": {
"$ref": "#/definitions/Route" "$ref": "#/definitions/ContactPoints"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
} }
} }
} }
@ -1843,9 +1834,9 @@
], ],
"responses": { "responses": {
"202": { "202": {
"description": "Ack", "description": "EmbeddedContactPoint",
"schema": { "schema": {
"$ref": "#/definitions/Ack" "$ref": "#/definitions/EmbeddedContactPoint"
} }
}, },
"400": { "400": {
@ -1919,17 +1910,8 @@
} }
], ],
"responses": { "responses": {
"202": { "204": {
"description": "Ack", "description": " The contact point was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
} }
@ -1996,12 +1978,6 @@
"schema": { "schema": {
"$ref": "#/definitions/MuteTimings" "$ref": "#/definitions/MuteTimings"
} }
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
}, },
@ -2052,7 +2028,7 @@
{ {
"type": "string", "type": "string",
"x-go-name": "Name", "x-go-name": "Name",
"description": "Template Name", "description": "Mute timing name",
"name": "name", "name": "name",
"in": "path", "in": "path",
"required": true "required": true
@ -2065,11 +2041,8 @@
"$ref": "#/definitions/MuteTimeInterval" "$ref": "#/definitions/MuteTimeInterval"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
}, },
@ -2087,7 +2060,7 @@
{ {
"type": "string", "type": "string",
"x-go-name": "Name", "x-go-name": "Name",
"description": "Template Name", "description": "Mute timing name",
"name": "name", "name": "name",
"in": "path", "in": "path",
"required": true "required": true
@ -2126,7 +2099,7 @@
{ {
"type": "string", "type": "string",
"x-go-name": "Name", "x-go-name": "Name",
"description": "Template Name", "description": "Mute timing name",
"name": "name", "name": "name",
"in": "path", "in": "path",
"required": true "required": true
@ -2134,10 +2107,7 @@
], ],
"responses": { "responses": {
"204": { "204": {
"description": "Ack", "description": " The mute timing was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
} }
} }
} }
@ -2156,12 +2126,6 @@
"schema": { "schema": {
"$ref": "#/definitions/Route" "$ref": "#/definitions/Route"
} }
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
}, },
@ -2177,6 +2141,7 @@
"operationId": "RoutePutPolicyTree", "operationId": "RoutePutPolicyTree",
"parameters": [ "parameters": [
{ {
"description": "The new notification routing tree to use",
"name": "Body", "name": "Body",
"in": "body", "in": "body",
"schema": { "schema": {
@ -2210,16 +2175,13 @@
"operationId": "RouteGetTemplates", "operationId": "RouteGetTemplates",
"responses": { "responses": {
"200": { "200": {
"description": "MessageTemplate", "description": "MessageTemplates",
"schema": { "schema": {
"$ref": "#/definitions/MessageTemplate" "$ref": "#/definitions/MessageTemplates"
} }
}, },
"400": { "404": {
"description": "ValidationError", "description": " Not found."
"schema": {
"$ref": "#/definitions/ValidationError"
}
} }
} }
} }
@ -2250,10 +2212,7 @@
} }
}, },
"404": { "404": {
"description": "NotFound", "description": " Not found."
"schema": {
"$ref": "#/definitions/NotFound"
}
} }
} }
}, },
@ -2286,9 +2245,9 @@
], ],
"responses": { "responses": {
"202": { "202": {
"description": "Ack", "description": "MessageTemplate",
"schema": { "schema": {
"$ref": "#/definitions/Ack" "$ref": "#/definitions/MessageTemplate"
} }
}, },
"400": { "400": {
@ -2318,10 +2277,7 @@
], ],
"responses": { "responses": {
"204": { "204": {
"description": "Ack", "description": " The template was deleted successfully."
"schema": {
"$ref": "#/definitions/Ack"
}
} }
} }
} }
@ -2934,6 +2890,13 @@
}, },
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
}, },
"ContactPoints": {
"type": "array",
"items": {
"$ref": "#/definitions/EmbeddedContactPoint"
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"CreateDashboardSnapshotCommand": { "CreateDashboardSnapshotCommand": {
"type": "object", "type": "object",
"required": [ "required": [
@ -3981,14 +3944,16 @@
"MessageTemplate": { "MessageTemplate": {
"type": "object", "type": "object",
"properties": { "properties": {
"Name": { "name": {
"type": "string" "type": "string",
}, "x-go-name": "Name"
"Template": {
"type": "string"
}, },
"provenance": { "provenance": {
"$ref": "#/definitions/Provenance" "$ref": "#/definitions/Provenance"
},
"template": {
"type": "string",
"x-go-name": "Template"
} }
}, },
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
@ -3996,8 +3961,9 @@
"MessageTemplateContent": { "MessageTemplateContent": {
"type": "object", "type": "object",
"properties": { "properties": {
"Template": { "template": {
"type": "string" "type": "string",
"x-go-name": "Template"
} }
}, },
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
@ -5577,7 +5543,8 @@
"properties": { "properties": {
"msg": { "msg": {
"type": "string", "type": "string",
"x-go-name": "Msg" "x-go-name": "Msg",
"example": "error message"
} }
}, },
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
@ -5914,6 +5881,7 @@
"$ref": "#/definitions/Duration" "$ref": "#/definitions/Duration"
}, },
"gettableAlert": { "gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object", "type": "object",
"required": [ "required": [
"labels", "labels",
@ -5973,16 +5941,15 @@
"x-go-name": "UpdatedAt" "x-go-name": "UpdatedAt"
} }
}, },
"x-go-name": "GettableAlert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/gettableAlert" "$ref": "#/definitions/gettableAlert"
}, },
"gettableAlerts": { "gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/gettableAlert" "$ref": "#/definitions/gettableAlert"
}, },
"x-go-name": "GettableAlerts",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/gettableAlerts" "$ref": "#/definitions/gettableAlerts"
}, },
"gettableSilence": { "gettableSilence": {
@ -6043,11 +6010,12 @@
"$ref": "#/definitions/gettableSilence" "$ref": "#/definitions/gettableSilence"
}, },
"gettableSilences": { "gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/gettableSilence" "$ref": "#/definitions/gettableSilence"
}, },
"x-go-name": "GettableSilences",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/gettableSilences" "$ref": "#/definitions/gettableSilences"
}, },
"labelSet": { "labelSet": {
@ -6221,6 +6189,7 @@
"$ref": "#/definitions/postableSilence" "$ref": "#/definitions/postableSilence"
}, },
"receiver": { "receiver": {
"description": "Receiver receiver",
"type": "object", "type": "object",
"required": [ "required": [
"name" "name"
@ -6232,8 +6201,6 @@
"x-go-name": "Name" "x-go-name": "Name"
} }
}, },
"x-go-name": "Receiver",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/receiver" "$ref": "#/definitions/receiver"
}, },
"silence": { "silence": {

Loading…
Cancel
Save