From 8378a9c4df9af5f5cc72a3515ca65d1e3ca011a0 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 8 Jun 2021 10:55:02 +0200 Subject: Fix network prune api docs The api doc used wrong response examples for both the compat and libpod network prune endpoints. Change the doc so that it matches the actual return values. Also fix the endpoints to return an empty array instead of null when no networks are removed. [NO TESTS NEEDED] Fixes: #10564 Signed-off-by: Paul Holzinger --- pkg/api/server/register_networks.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/api/server') diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 4d9806316..d122c6a36 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -180,9 +180,12 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 200: // description: OK // schema: - // type: array - // items: - // type: string + // type: object + // properties: + // NetworksDeleted: + // type: array + // items: + // type: string // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/networks/prune"), s.APIHandler(compat.Prune)).Methods(http.MethodPost) -- cgit v1.2.3-54-g00ecf