fix(http): update NotificationRuleBase and NotificationRule schema to reflect reality (#15244)
* NotificationRuleBase: the endpointID should be required and editable, there is missing a links property * NotificationRule: add discriminator * add a missing TraceSpan parameter into a GetNotificationRules and GetCheckspull/15286/head
parent
95d6301458
commit
732c0cc28d
|
@ -5093,6 +5093,7 @@ paths:
|
||||||
- Checks
|
- Checks
|
||||||
summary: Get all checks
|
summary: Get all checks
|
||||||
parameters:
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/TraceSpan'
|
||||||
- $ref: '#/components/parameters/Offset'
|
- $ref: '#/components/parameters/Offset'
|
||||||
- $ref: '#/components/parameters/Limit'
|
- $ref: '#/components/parameters/Limit'
|
||||||
- in: query
|
- in: query
|
||||||
|
@ -5374,6 +5375,7 @@ paths:
|
||||||
- NotificationRules
|
- NotificationRules
|
||||||
summary: Get all notification rules
|
summary: Get all notification rules
|
||||||
parameters:
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/TraceSpan'
|
||||||
- $ref: '#/components/parameters/Offset'
|
- $ref: '#/components/parameters/Offset'
|
||||||
- $ref: '#/components/parameters/Limit'
|
- $ref: '#/components/parameters/Limit'
|
||||||
- in: query
|
- in: query
|
||||||
|
@ -9522,6 +9524,13 @@ components:
|
||||||
- $ref: "#/components/schemas/SMTPNotificationRule"
|
- $ref: "#/components/schemas/SMTPNotificationRule"
|
||||||
- $ref: "#/components/schemas/PagerDutyNotificationRule"
|
- $ref: "#/components/schemas/PagerDutyNotificationRule"
|
||||||
- $ref: "#/components/schemas/HTTPNotificationRule"
|
- $ref: "#/components/schemas/HTTPNotificationRule"
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
|
mapping:
|
||||||
|
slack: "#/components/schemas/SlackNotificationRule"
|
||||||
|
smtp: "#/components/schemas/SMTPNotificationRule"
|
||||||
|
pagerduty: "#/components/schemas/PagerDutyNotificationRule"
|
||||||
|
http: "#/components/schemas/HTTPNotificationRule"
|
||||||
NotificationRules:
|
NotificationRules:
|
||||||
properties:
|
properties:
|
||||||
notificationRules:
|
notificationRules:
|
||||||
|
@ -9539,13 +9548,13 @@ components:
|
||||||
- name
|
- name
|
||||||
- tagRules
|
- tagRules
|
||||||
- statusRules
|
- statusRules
|
||||||
|
- endpointID
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
type: string
|
type: string
|
||||||
endpointID:
|
endpointID:
|
||||||
type: string
|
type: string
|
||||||
readOnly: true
|
|
||||||
orgID:
|
orgID:
|
||||||
description: The ID of the organization that owns this notification rule.
|
description: The ID of the organization that owns this notification rule.
|
||||||
type: string
|
type: string
|
||||||
|
@ -9598,6 +9607,27 @@ components:
|
||||||
$ref: "#/components/schemas/StatusRule"
|
$ref: "#/components/schemas/StatusRule"
|
||||||
labels:
|
labels:
|
||||||
$ref: "#/components/schemas/Labels"
|
$ref: "#/components/schemas/Labels"
|
||||||
|
links:
|
||||||
|
type: object
|
||||||
|
readOnly: true
|
||||||
|
example:
|
||||||
|
self: "/api/v2/notificationRules/1"
|
||||||
|
labels: "/api/v2/notificationRules/1/labels"
|
||||||
|
members: "/api/v2/notificationRules/1/members"
|
||||||
|
owners: "/api/v2/notificationRules/1/owners"
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
description: URL for this endpoint.
|
||||||
|
$ref: "#/components/schemas/Link"
|
||||||
|
labels:
|
||||||
|
description: URL to retrieve labels for this notification rule.
|
||||||
|
$ref: "#/components/schemas/Link"
|
||||||
|
members:
|
||||||
|
description: URL to retrieve members for this notification rule.
|
||||||
|
$ref: "#/components/schemas/Link"
|
||||||
|
owners:
|
||||||
|
description: URL to retrieve owners for this notification rule.
|
||||||
|
$ref: "#/components/schemas/Link"
|
||||||
TagRule:
|
TagRule:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in New Issue