From 6091e1d7611d46f5da1455c32009c168ec1c310c Mon Sep 17 00:00:00 2001 From: tangxinfa Date: Mon, 6 May 2024 17:16:55 +0800 Subject: [PATCH] fix: form tag --- generate/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/parser.go b/generate/parser.go index ea94cb2..896f368 100644 --- a/generate/parser.go +++ b/generate/parser.go @@ -253,7 +253,7 @@ func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swagge if defineStruct, ok := route.RequestType.(spec.DefineStruct); ok { for _, member := range defineStruct.Members { - if strings.Contains(member.Tag, "form") { + if member.IsFormMember() { operationObject.Consumes = []string{"multipart/form-data"} break }