upgrade: update wrapper

This commit is contained in:
2025-10-13 23:20:01 +08:00
parent 7ba9993e06
commit 868ee89556
4 changed files with 7 additions and 5 deletions

View File

@ -123,7 +123,7 @@ func (g *Generate) AddApiFromInAndOut(uriPrefix string, paramType reflect.Type,
// 接口文档初始化
cfg := g.getApiDocBaseCfg(baseCfg, paramType)
if op_array.Has(*op_array.ArrayType[string](g.readMethodList), baseCfg.Method) >= 0 {
if op_array.ArrayType[string](g.readMethodList).Has(baseCfg.Method) >= 0 {
cfg.RequestBody = nil // get类请求没有request body
// 参数解析
g.ParseReadConfigParam(baseCfg, cfg, paramType)
@ -743,7 +743,7 @@ func (g *Generate) parseBaseUriConfig(uriPrefix string, paramType reflect.Type)
res.Deprecated = deprecated == "1" || deprecated == "true"
requestContentType := strings.TrimSpace(metaField.Tag.Get(define.TagContentType))
if len(requestContentType) == 0 {
if op_array.Has(*op_array.ArrayType[string](g.readMethodList), res.Method) >= 0 {
if op_array.ArrayType[string](g.readMethodList).Has(res.Method) >= 0 {
// get类请求
requestContentType = consts.MimeTypeXWWWFormUrlencoded
} else {