Add missing error codes to documentation, fix wrong success type

This commit is contained in:
Christoph Kluge
2022-09-21 17:03:01 +02:00
parent 3a582ee2f5
commit 872bc77708
4 changed files with 186 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
// Package api GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2022-09-21 14:20:28.235814518 +0200 CEST m=+0.133704544
// 2022-09-21 16:59:20.417950914 +0200 CEST m=+0.112710428
package api
import "github.com/swaggo/swag"
@@ -102,6 +102,12 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
}
}
}
@@ -145,8 +151,20 @@ const docTemplate = `{
"$ref": "#/definitions/api.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"422": {
"description": "The combination of jobId, clusterId and startTime does already exist",
"description": "Unprocessable Entity: The combination of jobId, clusterId and startTime does already exist",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
@@ -178,7 +196,7 @@ const docTemplate = `{
}
],
"responses": {
"201": {
"200": {
"description": "Job resource",
"schema": {
"$ref": "#/definitions/schema.JobMeta"
@@ -190,11 +208,29 @@ const docTemplate = `{
"$ref": "#/definitions/api.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"404": {
"description": "Resource not found",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"422": {
"description": "Unprocessable Entity: finding job failed: sql: no rows in result set",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
}
}
}
@@ -233,7 +269,7 @@ const docTemplate = `{
}
],
"responses": {
"201": {
"200": {
"description": "Job resource",
"schema": {
"$ref": "#/definitions/schema.JobMeta"
@@ -245,11 +281,29 @@ const docTemplate = `{
"$ref": "#/definitions/api.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"404": {
"description": "Resource not found",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"422": {
"description": "Unprocessable Entity: finding job failed: sql: no rows in result set",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
}
}
}
@@ -308,6 +362,12 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ErrorResponse"
}
}
}
}