From da1186ae639c8101f05e4350986fdab0b1bd3566 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 22 Jan 2020 10:41:35 -0700 Subject: Enable swagger validation for each PR * Update swagger:operation's to pass validation * 'name' path parameter now used throughout API * Added #/response/ok for 200 returns, TBD values have been replaced with legal values. Signed-off-by: Jhon Honce --- pkg/api/server/swagger.go | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'pkg/api/server/swagger.go') diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go index dbf499ce7..f6643600a 100644 --- a/pkg/api/server/swagger.go +++ b/pkg/api/server/swagger.go @@ -41,7 +41,7 @@ type swagErrNoSuchPod struct { } } -// Internal error +// Internal server error // swagger:response InternalError type swagInternalError struct { // in:body @@ -59,7 +59,7 @@ type swagGenericError struct { } } -// Conflict error +// Conflict error in operation // swagger:response ConflictError type swagConflictError struct { // in:body @@ -68,7 +68,7 @@ type swagConflictError struct { } } -// Bad parameter +// Bad parameter in request // swagger:response BadParamError type swagBadParamError struct { // in:body @@ -134,3 +134,23 @@ type swagListContainers struct { // swagger:response tbd type swagTBD struct { } + +// Success +// swagger:response +type swag struct { + // in:body + Body struct { + // example: OK + ok string + } +} + +// Success +// swagger:response +type ok struct { + // in:body + Body struct { + // example: OK + ok string + } +} -- cgit v1.2.3-54-g00ecf