From eb83e320d2995d605c6c336856fcc4fb9017e6b4 Mon Sep 17 00:00:00 2001 From: yoyofx Date: Mon, 29 Jan 2024 10:05:59 +0800 Subject: [PATCH] assemble swagger api json --- web/endpoints/swagger.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/endpoints/swagger.go b/web/endpoints/swagger.go index b722241..7b3f872 100644 --- a/web/endpoints/swagger.go +++ b/web/endpoints/swagger.go @@ -63,12 +63,13 @@ func FilterValidParams(controller mvc.ControllerDescriptor, pathMap map[string]m } } - pathInfo.RequestBody = RequestBody(param) - pathInfoMap[act.ActionMethod] = pathInfo - } } + if act.ActionMethod == "any" { + act.ActionMethod = "get" + } + pathInfoMap[act.ActionMethod] = pathInfo } return pathMap