From 218d91d76d49c7329704a80411ad2c115b074f84 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Mon, 1 Nov 2021 16:10:10 +0100 Subject: Fix libpod API conformance to swagger * Return empty array when nothing has been pruned. * Use correct return type swagger doc-comment. Signed-off-by: Matej Vasek --- pkg/api/server/register_images.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api/server/register_images.go') diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index 95a8b4939..82b4c2d89 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -1069,7 +1069,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // - application/json // responses: // 200: - // $ref: "#/responses/DocsImageDeleteResponse" + // $ref: "#/responses/DocsLibpodPruneResponse" // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/prune"), s.APIHandler(libpod.PruneImages)).Methods(http.MethodPost) -- cgit v1.2.3-54-g00ecf From 120ad2d3ca0ac04a3421d620a8fdf06c472abd2c Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Mon, 1 Nov 2021 17:09:35 +0100 Subject: Use correct swagger type in doc-comment Signed-off-by: Matej Vasek --- pkg/api/server/register_images.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api/server/register_images.go') diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index 82b4c2d89..effe6627d 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -967,7 +967,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // - application/json // responses: // 200: - // $ref: "#/responses/DocsImageDeleteResponse" + // $ref: "#/responses/DocsLibpodImagesRemoveResponse" // 400: // $ref: "#/responses/BadParamError" // 404: -- cgit v1.2.3-54-g00ecf