update common

This commit is contained in:
2024-12-24 16:59:37 +08:00
parent e044ff3e59
commit 4bae125445
2 changed files with 25 additions and 8 deletions

View File

@ -58,6 +58,16 @@ func GetParamType(docParamType string, formatType string) consts.DataType {
return consts.DataTypeUint
case "string":
return consts.DataTypeString
case "object":
return consts.DataTypeMapStrAny
case "array":
if formatType == "integer" {
return consts.DataTypeSliceInt
} else if formatType == "string" {
return consts.DataTypeSliceString
} else {
return consts.DataTypeSliceAny
}
default:
return consts.DataTypeMapStrAny
}