upgrade: update wrapper

This commit is contained in:
2025-10-13 17:56:20 +08:00
parent 8126fbec86
commit 7ba9993e06
3 changed files with 23 additions and 20 deletions

View File

@ -16,7 +16,7 @@ import (
apiDocDefine "git.zhangdeman.cn/zhangdeman/api-doc/define"
"git.zhangdeman.cn/zhangdeman/consts"
"git.zhangdeman.cn/zhangdeman/wrapper"
"git.zhangdeman.cn/zhangdeman/wrapper/op_any"
)
// HandleOpenapiDocRes ...
@ -200,7 +200,7 @@ func (hod *handleOpenapiDoc) expendObjectOrArrayRequest(importUriConfig *apiDocD
if len(parentPath) > 0 {
currentPropertyName = parentPath + "." + currentPropertyName
}
defaultValue := wrapper.AnyDataType(currentProperty.Default).ToString().Value()
defaultValue := op_any.AnyDataType(currentProperty.Default).ToString()
// 基础数据类型
if len(currentProperty.Properties) == 0 && currentProperty.Type != consts.SwaggerDataTypeObject && currentProperty.Type != consts.SwaggerDataTypeArray && len(currentProperty.Ref) == 0 {
importUriConfig.ParamList = append(importUriConfig.ParamList, &apiDocDefine.ApiParamItem{
@ -432,7 +432,7 @@ func (hod *handleOpenapiDoc) expendObjectOrArrayPath(importUriConfig *apiDocDefi
if len(parentPath) > 0 {
currentPropertyName = parentPath + "." + currentPropertyName
}
defaultValue := wrapper.AnyDataType(currentProperty.Default).ToString().Value()
defaultValue := op_any.AnyDataType(currentProperty.Default).ToString()
// 基础数据类型
if len(currentProperty.Properties) == 0 && currentProperty.Type != consts.SwaggerDataTypeObject && currentProperty.Type != consts.SwaggerDataTypeArray && len(currentProperty.Ref) == 0 {
importUriConfig.ResultList = append(importUriConfig.ResultList, &apiDocDefine.ApiResultItem{