重新规划添加接口的方法签名
This commit is contained in:
11
generate.go
11
generate.go
@ -10,7 +10,6 @@ package api_doc
|
||||
import (
|
||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
||||
"git.zhangdeman.cn/zhangdeman/consts"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -156,14 +155,10 @@ type PathItemOperationConfig struct {
|
||||
// Description: "这是一份示例基础配置",
|
||||
// }
|
||||
//
|
||||
// parameterPtr : 请求表单结构体实例, 必须为指针, 作用 -> 基于反射生成参数文档
|
||||
// paramList : 参数列表
|
||||
//
|
||||
// resultPtr : 返回值结构体实例, 必须为指针, 作用 -> 基于反射生成返回值文档
|
||||
func (g *Generate) AddApi(baseCfg *define.UriBaseConfig, parameterPtr any, resultPtr any) error {
|
||||
paramType := reflect.TypeOf(parameterPtr)
|
||||
for idx := 0; idx < paramType.NumField(); idx++ {
|
||||
// resultList : 返回值列表
|
||||
func (g *Generate) AddApi(baseCfg *define.UriBaseConfig, paramList []*define.ParamConfig, resultList []*define.ResultConfig) error {
|
||||
|
||||
}
|
||||
resultType := reflect.TypeOf(resultPtr)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user