mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 16:58:31 +02:00
fix(api): missing health field for route in docs and generated api code
This commit is contained in:
@@ -2033,6 +2033,70 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"HealthExtra": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"config": {
|
||||||
|
"$ref": "#/definitions/LoadBalancerConfig"
|
||||||
|
},
|
||||||
|
"pool": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"HealthJSON": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"config": {
|
||||||
|
"$ref": "#/definitions/HealthCheckConfig"
|
||||||
|
},
|
||||||
|
"detail": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthExtra"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x-nullable": true
|
||||||
|
},
|
||||||
|
"lastSeen": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"lastSeenStr": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"latency": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"latencyStr": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"started": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"startedStr": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uptime": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"uptimeStr": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"HealthMap": {
|
"HealthMap": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
@@ -2491,6 +2555,14 @@ const docTemplate = `{
|
|||||||
"excluded": {
|
"excluded": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"health": {
|
||||||
|
"description": "for swagger",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthJSON"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"healthcheck": {
|
"healthcheck": {
|
||||||
"$ref": "#/definitions/HealthCheckConfig"
|
"$ref": "#/definitions/HealthCheckConfig"
|
||||||
},
|
},
|
||||||
@@ -3225,6 +3297,14 @@ const docTemplate = `{
|
|||||||
"excluded": {
|
"excluded": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"health": {
|
||||||
|
"description": "for swagger",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthJSON"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"healthcheck": {
|
"healthcheck": {
|
||||||
"$ref": "#/definitions/HealthCheckConfig"
|
"$ref": "#/definitions/HealthCheckConfig"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2196,6 +2196,104 @@
|
|||||||
"x-nullable": false,
|
"x-nullable": false,
|
||||||
"x-omitempty": false
|
"x-omitempty": false
|
||||||
},
|
},
|
||||||
|
"HealthExtra": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"config": {
|
||||||
|
"$ref": "#/definitions/LoadBalancerConfig",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"pool": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {},
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"HealthJSON": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"config": {
|
||||||
|
"$ref": "#/definitions/HealthCheckConfig",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"detail": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthExtra"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x-nullable": true
|
||||||
|
},
|
||||||
|
"lastSeen": {
|
||||||
|
"type": "integer",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"lastSeenStr": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"latency": {
|
||||||
|
"type": "number",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"latencyStr": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"started": {
|
||||||
|
"type": "integer",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"startedStr": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"uptime": {
|
||||||
|
"type": "number",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"uptimeStr": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
"HealthMap": {
|
"HealthMap": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
@@ -2840,6 +2938,16 @@
|
|||||||
"x-nullable": false,
|
"x-nullable": false,
|
||||||
"x-omitempty": false
|
"x-omitempty": false
|
||||||
},
|
},
|
||||||
|
"health": {
|
||||||
|
"description": "for swagger",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthJSON"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
"healthcheck": {
|
"healthcheck": {
|
||||||
"$ref": "#/definitions/HealthCheckConfig",
|
"$ref": "#/definitions/HealthCheckConfig",
|
||||||
"x-nullable": false,
|
"x-nullable": false,
|
||||||
@@ -3890,6 +3998,16 @@
|
|||||||
"x-nullable": false,
|
"x-nullable": false,
|
||||||
"x-omitempty": false
|
"x-omitempty": false
|
||||||
},
|
},
|
||||||
|
"health": {
|
||||||
|
"description": "for swagger",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/HealthJSON"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x-nullable": false,
|
||||||
|
"x-omitempty": false
|
||||||
|
},
|
||||||
"healthcheck": {
|
"healthcheck": {
|
||||||
"$ref": "#/definitions/HealthCheckConfig",
|
"$ref": "#/definitions/HealthCheckConfig",
|
||||||
"x-nullable": false,
|
"x-nullable": false,
|
||||||
|
|||||||
@@ -226,6 +226,47 @@ definitions:
|
|||||||
use_get:
|
use_get:
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
HealthExtra:
|
||||||
|
properties:
|
||||||
|
config:
|
||||||
|
$ref: '#/definitions/LoadBalancerConfig'
|
||||||
|
pool:
|
||||||
|
additionalProperties: {}
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
HealthJSON:
|
||||||
|
properties:
|
||||||
|
config:
|
||||||
|
$ref: '#/definitions/HealthCheckConfig'
|
||||||
|
detail:
|
||||||
|
type: string
|
||||||
|
extra:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/HealthExtra'
|
||||||
|
x-nullable: true
|
||||||
|
lastSeen:
|
||||||
|
type: integer
|
||||||
|
lastSeenStr:
|
||||||
|
type: string
|
||||||
|
latency:
|
||||||
|
type: number
|
||||||
|
latencyStr:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
started:
|
||||||
|
type: integer
|
||||||
|
startedStr:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
uptime:
|
||||||
|
type: number
|
||||||
|
uptimeStr:
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
HealthMap:
|
HealthMap:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
$ref: '#/definitions/routes.HealthInfo'
|
$ref: '#/definitions/routes.HealthInfo'
|
||||||
@@ -396,11 +437,11 @@ definitions:
|
|||||||
- 1mo
|
- 1mo
|
||||||
type: string
|
type: string
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
|
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
||||||
|
MetricsPeriod5m: '@name MetricsPeriod5m'
|
||||||
MetricsPeriod15m: '@name MetricsPeriod15m'
|
MetricsPeriod15m: '@name MetricsPeriod15m'
|
||||||
MetricsPeriod1d: '@name MetricsPeriod1d'
|
MetricsPeriod1d: '@name MetricsPeriod1d'
|
||||||
MetricsPeriod1h: '@name MetricsPeriod1h'
|
MetricsPeriod1h: '@name MetricsPeriod1h'
|
||||||
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
|
||||||
MetricsPeriod5m: '@name MetricsPeriod5m'
|
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- MetricsPeriod5m
|
- MetricsPeriod5m
|
||||||
- MetricsPeriod15m
|
- MetricsPeriod15m
|
||||||
@@ -535,6 +576,10 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
excluded:
|
excluded:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
health:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/HealthJSON'
|
||||||
|
description: for swagger
|
||||||
healthcheck:
|
healthcheck:
|
||||||
$ref: '#/definitions/HealthCheckConfig'
|
$ref: '#/definitions/HealthCheckConfig'
|
||||||
homepage:
|
homepage:
|
||||||
@@ -1060,6 +1105,10 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
excluded:
|
excluded:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
health:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/HealthJSON'
|
||||||
|
description: for swagger
|
||||||
healthcheck:
|
healthcheck:
|
||||||
$ref: '#/definitions/HealthCheckConfig'
|
$ref: '#/definitions/HealthCheckConfig'
|
||||||
homepage:
|
homepage:
|
||||||
@@ -2075,11 +2124,11 @@ paths:
|
|||||||
name: period
|
name: period
|
||||||
type: string
|
type: string
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
|
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
||||||
|
MetricsPeriod5m: '@name MetricsPeriod5m'
|
||||||
MetricsPeriod15m: '@name MetricsPeriod15m'
|
MetricsPeriod15m: '@name MetricsPeriod15m'
|
||||||
MetricsPeriod1d: '@name MetricsPeriod1d'
|
MetricsPeriod1d: '@name MetricsPeriod1d'
|
||||||
MetricsPeriod1h: '@name MetricsPeriod1h'
|
MetricsPeriod1h: '@name MetricsPeriod1h'
|
||||||
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
|
||||||
MetricsPeriod5m: '@name MetricsPeriod5m'
|
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- MetricsPeriod5m
|
- MetricsPeriod5m
|
||||||
- MetricsPeriod15m
|
- MetricsPeriod15m
|
||||||
@@ -2129,11 +2178,11 @@ paths:
|
|||||||
name: interval
|
name: interval
|
||||||
type: string
|
type: string
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
|
MetricsPeriod15m: '@name MetricsPeriod15m'
|
||||||
|
MetricsPeriod1d: '@name MetricsPeriod1d'
|
||||||
MetricsPeriod1h: '@name MetricsPeriod1h'
|
MetricsPeriod1h: '@name MetricsPeriod1h'
|
||||||
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
||||||
MetricsPeriod5m: '@name MetricsPeriod5m'
|
MetricsPeriod5m: '@name MetricsPeriod5m'
|
||||||
MetricsPeriod15m: '@name MetricsPeriod15m'
|
|
||||||
MetricsPeriod1d: '@name MetricsPeriod1d'
|
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- MetricsPeriod5m
|
- MetricsPeriod5m
|
||||||
- MetricsPeriod15m
|
- MetricsPeriod15m
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ type (
|
|||||||
Idlewatcher *types.IdlewatcherConfig `json:"idlewatcher,omitempty" extensions:"x-nullable"`
|
Idlewatcher *types.IdlewatcherConfig `json:"idlewatcher,omitempty" extensions:"x-nullable"`
|
||||||
HealthMon types.HealthMonitor `json:"health,omitempty" swaggerignore:"true"`
|
HealthMon types.HealthMonitor `json:"health,omitempty" swaggerignore:"true"`
|
||||||
// for swagger
|
// for swagger
|
||||||
HealthJSON *types.HealthJSON `json:"-" form:"health"`
|
HealthJSON *types.HealthJSON `json:",omitempty" form:"health"`
|
||||||
|
|
||||||
Metadata `deserialize:"-"`
|
Metadata `deserialize:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user