fix(http): update swagger for easily use in clients (#16067)
* added date-time format for start and stop DeletePredicateRequest * fixed malformed reference to ViewProperties in PkgChart model * define separate model for RetentionRule as is in Organizations, Buckets, Labels * "labels" property from Check and PostCheck should be part of CheckBase (it is ancestor for all Check types) * "labels" property from NotificationRule and PostNotificationRule should be part of NotificationRuleBase (it is ancestor for all NotificationRule and types) * "labels" property from NotificationEndpoint and PostNotificationEndpoint should be part of NotificationEndpointBase (it is ancestor for all NotificationEndpoint and types) * The url property of HTTPNotificationRuleBase should not be required * Added query link for CheckBase and NotificationRuleBasepull/16158/head
parent
55ce0a0bfc
commit
3e33a03ae1
123
http/swagger.yml
123
http/swagger.yml
|
@ -6329,9 +6329,11 @@ components:
|
|||
start:
|
||||
description: RFC3339Nano
|
||||
type: string
|
||||
format: date-time
|
||||
stop:
|
||||
description: RFC3339Nano
|
||||
type: string
|
||||
format: date-time
|
||||
predicate:
|
||||
description: InfluxQL-like delete statement
|
||||
example: tag1="value1" and (tag2="value2" and tag3!="value3")
|
||||
|
@ -6869,22 +6871,7 @@ components:
|
|||
rp:
|
||||
type: string
|
||||
retentionRules:
|
||||
type: array
|
||||
description: Rules to expire or retain data. No rules means data never expires.
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
default: expire
|
||||
enum:
|
||||
- expire
|
||||
everySeconds:
|
||||
type: integer
|
||||
description: Duration in seconds for how long data will be kept in the database.
|
||||
example: 86400
|
||||
minimum: 1
|
||||
required: [type, everySeconds]
|
||||
$ref: "#/components/schemas/RetentionRules"
|
||||
required: [name, retentionRules]
|
||||
Bucket:
|
||||
properties:
|
||||
|
@ -6949,22 +6936,6 @@ components:
|
|||
readOnly: true
|
||||
retentionRules:
|
||||
$ref: "#/components/schemas/RetentionRules"
|
||||
type: array
|
||||
description: Rules to expire or retain data. No rules means data never expires.
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
default: expire
|
||||
enum:
|
||||
- expire
|
||||
everySeconds:
|
||||
type: integer
|
||||
description: Duration in seconds for how long data will be kept in the database.
|
||||
example: 86400
|
||||
minimum: 1
|
||||
required: [type, everySeconds]
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
required: [name, retentionRules]
|
||||
|
@ -6982,19 +6953,21 @@ components:
|
|||
type: array
|
||||
description: Rules to expire or retain data. No rules means data never expires.
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
default: expire
|
||||
enum:
|
||||
- expire
|
||||
everySeconds:
|
||||
type: integer
|
||||
description: Duration in seconds for how long data will be kept in the database.
|
||||
example: 86400
|
||||
minimum: 1
|
||||
required: [type, everySeconds]
|
||||
$ref: "#/components/schemas/RetentionRule"
|
||||
RetentionRule:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
default: expire
|
||||
enum:
|
||||
- expire
|
||||
everySeconds:
|
||||
type: integer
|
||||
description: Duration in seconds for how long data will be kept in the database.
|
||||
example: 86400
|
||||
minimum: 1
|
||||
required: [type, everySeconds]
|
||||
Link:
|
||||
type: string
|
||||
format: uri
|
||||
|
@ -9920,25 +9893,9 @@ components:
|
|||
Check:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/CheckDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostCheck:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/CheckDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- inactive
|
||||
labels:
|
||||
type: array
|
||||
description: List of label ids to associate with check
|
||||
items:
|
||||
type: string
|
||||
Checks:
|
||||
properties:
|
||||
checks:
|
||||
|
@ -9995,6 +9952,8 @@ 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
|
||||
|
@ -10017,6 +9976,9 @@ components:
|
|||
owners:
|
||||
description: URL to retrieve owners for this check
|
||||
$ref: "#/components/schemas/Link"
|
||||
query:
|
||||
description: URL to retrieve flux script for this check
|
||||
$ref: "#/components/schemas/Link"
|
||||
required: [name, type, orgID, query]
|
||||
ThresholdCheck:
|
||||
allOf:
|
||||
|
@ -10144,25 +10106,9 @@ components:
|
|||
NotificationRule:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostNotificationRule:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- inactive
|
||||
labels:
|
||||
type: array
|
||||
description: List of label IDs to associate with notification rule.
|
||||
items:
|
||||
type: string
|
||||
NotificationRules:
|
||||
properties:
|
||||
notificationRules:
|
||||
|
@ -10237,6 +10183,8 @@ components:
|
|||
minItems: 1
|
||||
items:
|
||||
$ref: "#/components/schemas/StatusRule"
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
links:
|
||||
type: object
|
||||
readOnly: true
|
||||
|
@ -10259,6 +10207,9 @@ components:
|
|||
owners:
|
||||
description: URL to retrieve owners for this notification rule.
|
||||
$ref: "#/components/schemas/Link"
|
||||
query:
|
||||
description: URL to retrieve flux script for this notification rule.
|
||||
$ref: "#/components/schemas/Link"
|
||||
TagRule:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -10364,25 +10315,9 @@ components:
|
|||
NotificationEndpoint:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
|
||||
- type: object
|
||||
properties:
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
PostNotificationEndpoint:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
|
||||
- type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- inactive
|
||||
labels:
|
||||
type: array
|
||||
description: List of label IDs to associate with check.
|
||||
items:
|
||||
type: string
|
||||
NotificationEndpoints:
|
||||
properties:
|
||||
notificationEndpoints:
|
||||
|
@ -10419,6 +10354,8 @@ components:
|
|||
default: active
|
||||
type: string
|
||||
enum: ["active", "inactive"]
|
||||
labels:
|
||||
$ref: "#/components/schemas/Labels"
|
||||
links:
|
||||
type: object
|
||||
readOnly: true
|
||||
|
|
Loading…
Reference in New Issue