merge
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -385,7 +385,7 @@ func setGlobalMapDefinition(swaggerInfo *define.Swagger, dataType string) {
|
||||
//
|
||||
// Date : 15:46 2024/4/25
|
||||
func isGlobalMapType(dataType string) bool {
|
||||
return op_array.Has(*op_array.ArrayType[string]([]string{
|
||||
return op_array.ArrayType[string]([]string{
|
||||
consts.DataTypeMapAnyAny.String(),
|
||||
consts.DataTypeMapStrUint.String(),
|
||||
consts.DataTypeMapStrInt.String(),
|
||||
@@ -393,7 +393,7 @@ func isGlobalMapType(dataType string) bool {
|
||||
consts.DataTypeMapStrFloat.String(),
|
||||
consts.DataTypeMapStrBool.String(),
|
||||
consts.DataTypeMapStrAny.String(),
|
||||
}), dataType) >= 0
|
||||
}).Has(dataType) >= 0
|
||||
}
|
||||
|
||||
// initAnyDefinition 初始化一个definition
|
||||
|
||||
Reference in New Issue
Block a user