Merge pull request #15670 from influxdata/fix-swagger-resource-labels
fix(swagger): Fixes conflicting label typespull/15678/head
commit
a04212608a
http
ui/src/types
|
@ -9443,7 +9443,7 @@ components:
|
|||
enum:
|
||||
- active
|
||||
- inactive
|
||||
Check:
|
||||
CheckDiscriminator:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/DeadmanCheck"
|
||||
- $ref: "#/components/schemas/ThresholdCheck"
|
||||
|
@ -9452,9 +9452,16 @@ components:
|
|||
mapping:
|
||||
deadman: "#/components/schemas/DeadmanCheck"
|
||||
threshold: "#/components/schemas/ThresholdCheck"
|
||||
Check:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/CheckDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostCheck:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/Check"
|
||||
- $ref: "#/components/schemas/CheckDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
|
@ -9523,8 +9530,6 @@ components:
|
|||
statusMessageTemplate:
|
||||
description: The template used to generate and write a status message.
|
||||
type: string
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
links:
|
||||
type: object
|
||||
readOnly: true
|
||||
|
@ -9657,7 +9662,7 @@ components:
|
|||
enum:
|
||||
- active
|
||||
- inactive
|
||||
NotificationRule:
|
||||
NotificationRuleDiscriminator:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/SlackNotificationRule"
|
||||
- $ref: "#/components/schemas/SMTPNotificationRule"
|
||||
|
@ -9670,9 +9675,16 @@ components:
|
|||
smtp: "#/components/schemas/SMTPNotificationRule"
|
||||
pagerduty: "#/components/schemas/PagerDutyNotificationRule"
|
||||
http: "#/components/schemas/HTTPNotificationRule"
|
||||
NotificationRule:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostNotificationRule:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationRule"
|
||||
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
|
@ -9759,8 +9771,6 @@ components:
|
|||
minItems: 1
|
||||
items:
|
||||
$ref: "#/components/schemas/StatusRule"
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
links:
|
||||
type: object
|
||||
readOnly: true
|
||||
|
@ -9873,7 +9883,7 @@ components:
|
|||
enum:
|
||||
- active
|
||||
- inactive
|
||||
NotificationEndpoint:
|
||||
NotificationEndpointDiscrimator:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/SlackNotificationEndpoint"
|
||||
- $ref: "#/components/schemas/PagerDutyNotificationEndpoint"
|
||||
|
@ -9884,9 +9894,16 @@ components:
|
|||
slack: "#/components/schemas/SlackNotificationEndpoint"
|
||||
pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint"
|
||||
http: "#/components/schemas/HTTPNotificationEndpoint"
|
||||
NotificationEndpoint:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostNotificationEndpoint:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationEndpoint"
|
||||
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
|
@ -9935,8 +9952,6 @@ components:
|
|||
default: active
|
||||
type: string
|
||||
enum: ["active", "inactive"]
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
links:
|
||||
type: object
|
||||
readOnly: true
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
SMTPNotificationRuleBase,
|
||||
PagerDutyNotificationRuleBase,
|
||||
HTTPNotificationRuleBase,
|
||||
Label,
|
||||
} from 'src/client'
|
||||
|
||||
type Omit<T, U> = Pick<T, Exclude<keyof T, U>>
|
||||
|
@ -26,6 +27,7 @@ export type NotificationRuleBaseDraft = Overwrite<
|
|||
id?: string
|
||||
statusRules: StatusRuleDraft[]
|
||||
tagRules: TagRuleDraft[]
|
||||
labels?: Label[]
|
||||
}
|
||||
>
|
||||
|
||||
|
|
Loading…
Reference in New Issue