From 1a885810ec388fad1c03d468ede51982423278ff Mon Sep 17 00:00:00 2001 From: wren <1085252985@qq.com> Date: Thu, 8 Aug 2024 18:39:14 +0800 Subject: [PATCH] fix: json tag column contains orm words and is parsed to form-data --- generate/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/parser.go b/generate/parser.go index ea94cb2..3afb9e1 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 strings.Contains(member.Tag, "form:") { operationObject.Consumes = []string{"multipart/form-data"} break }