From 068cacfebe56d22b437dde68d0ad21ad5aef4954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E6=8F=92=E7=94=B5?= <69096367+r27153733@users.noreply.github.com> Date: Fri, 31 May 2024 15:56:13 +0800 Subject: [PATCH] fix: handling of DELETE requests without body. --- generate/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/parser.go b/generate/parser.go index ea94cb2..5ecc8e3 100644 --- a/generate/parser.go +++ b/generate/parser.go @@ -166,7 +166,7 @@ func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swagge parameters = parseHeader(member, parameters) } } - if strings.ToUpper(route.Method) == http.MethodGet { + if strings.ToUpper(route.Method) == http.MethodGet || strings.ToUpper(route.Method) == http.MethodDelete { for _, member := range defineStruct.Members { if hasPathParameters(member) || hasHeaderParameters(member) { continue