From 9228c3e08145ebf06788ae18d20eaca9c7fb917e Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Fri, 10 Jul 2020 08:34:36 +0200 Subject: [PATCH] feat(notification/teams): update swagger --- http/swagger.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/http/swagger.yml b/http/swagger.yml index cea3ab340eb..b72c63a5616 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -11392,6 +11392,7 @@ components: - $ref: "#/components/schemas/PagerDutyNotificationRule" - $ref: "#/components/schemas/HTTPNotificationRule" - $ref: "#/components/schemas/TelegramNotificationRule" + - $ref: "#/components/schemas/TeamsNotificationRule" discriminator: propertyName: type mapping: @@ -11400,6 +11401,7 @@ components: pagerduty: "#/components/schemas/PagerDutyNotificationRule" http: "#/components/schemas/HTTPNotificationRule" telegram: "#/components/schemas/TelegramNotificationRule" + teams: "#/components/schemas/TeamsNotificationRule" NotificationRule: allOf: - $ref: "#/components/schemas/NotificationRuleDiscriminator" @@ -11571,6 +11573,27 @@ components: allOf: - $ref: "#/components/schemas/NotificationRuleBase" - $ref: "#/components/schemas/SlackNotificationRuleBase" + TeamsNotificationRule: + allOf: + - $ref: "#/components/schemas/NotificationRuleBase" + - $ref: "#/components/schemas/TeamsNotificationRuleBase" + TeamsNotificationRuleBase: + type: object + required: [type, title, messageTemplate] + properties: + type: + description: The discriminator between other types of notification rules is "teams". + type: string + enum: [teams] + title: + description: The message title as a flux interpolated string. + type: string + messageTemplate: + description: The message template as a flux interpolated string. + type: string + summary: + description: The message summary as a flux interpolated string. + type: string SMTPNotificationRule: allOf: - $ref: "#/components/schemas/NotificationRuleBase" @@ -11645,6 +11668,7 @@ components: - $ref: "#/components/schemas/PagerDutyNotificationEndpoint" - $ref: "#/components/schemas/HTTPNotificationEndpoint" - $ref: "#/components/schemas/TelegramNotificationEndpoint" + - $ref: "#/components/schemas/TeamsNotificationEndpoint" discriminator: propertyName: type mapping: @@ -11652,6 +11676,7 @@ components: pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint" telegram: "#/components/schemas/TelegramNotificationEndpoint" + teams: "#/components/schemas/TeamsNotificationEndpoint" NotificationEndpoint: allOf: - $ref: "#/components/schemas/NotificationEndpointDiscrimator" @@ -11783,9 +11808,22 @@ components: channel: description: ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . type: string + TeamsNotificationEndpoint: + type: object + allOf: + - $ref: "#/components/schemas/NotificationEndpointBase" + - type: object + required: [url] + properties: + url: + description: Teams incoming webhook URL, see https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#setting-up-a-custom-incoming-webhook . + type: string + secretURLSuffix: + description: A secret suffix that is appended to teams incoming webhook URL. + type: string NotificationEndpointType: type: string - enum: ["slack", "pagerduty", "http", "telegram"] + enum: ["slack", "pagerduty", "http", "telegram", "teams"] DBRP: required: - orgID