mirror of
https://github.com/F1bonacc1/process-compose.git
synced 2024-10-26 11:39:47 +03:00
Fix the scale swagger description
This commit is contained in:
parent
08ddae986e
commit
43ac3cc86f
@ -169,8 +169,9 @@ func (api *PcApi) RestartProcess(c *gin.Context) {
|
||||
// @Summary Scale a process to a given replicas count
|
||||
// @Produce json
|
||||
// @Param name path string true "Process Name"
|
||||
// @Param scale path int true "New amount of process replicas"
|
||||
// @Success 200 {string} string "Scaled Process Name"
|
||||
// @Router /process/scale/{name}/{scale} [post]
|
||||
// @Router /process/scale/{name}/{scale} [patch]
|
||||
func (api *PcApi) ScaleProcess(c *gin.Context) {
|
||||
name := c.Param("name")
|
||||
scale, err := strconv.Atoi(c.Param("scale"))
|
||||
|
@ -152,7 +152,7 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"/process/scale/{name}/{scale}": {
|
||||
"post": {
|
||||
"patch": {
|
||||
"description": "Scale a process",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -168,6 +168,13 @@ const docTemplate = `{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "New amount of process replicas",
|
||||
"name": "scale",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
@ -140,7 +140,7 @@
|
||||
}
|
||||
},
|
||||
"/process/scale/{name}/{scale}": {
|
||||
"post": {
|
||||
"patch": {
|
||||
"description": "Scale a process",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -156,6 +156,13 @@
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "New amount of process replicas",
|
||||
"name": "scale",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
@ -110,7 +110,7 @@ paths:
|
||||
tags:
|
||||
- Process
|
||||
/process/scale/{name}/{scale}:
|
||||
post:
|
||||
patch:
|
||||
description: Scale a process
|
||||
parameters:
|
||||
- description: Process Name
|
||||
@ -118,6 +118,11 @@ paths:
|
||||
name: name
|
||||
required: true
|
||||
type: string
|
||||
- description: New amount of process replicas
|
||||
in: path
|
||||
name: scale
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
Loading…
Reference in New Issue
Block a user