Skip to content

Commit 4d4e46d

Browse files
wangxiaoguokevwan
authored andcommitted
fix(swagger): 修复POST JSON参数判断逻辑错误
1 parent 410f56e commit 4d4e46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/goctl/api/swagger/parameter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
func isPostJson(ctx Context, method string, tp apiSpec.Type) (string, bool) {
12-
if strings.EqualFold(method, http.MethodPost) {
12+
if !strings.EqualFold(method, http.MethodPost) {
1313
return "", false
1414
}
1515
structType, ok := tp.(apiSpec.DefineStruct)

0 commit comments

Comments
 (0)