mirror of
https://github.com/xxjwxc/public.git
synced 2025-09-26 20:01:19 +08:00
new
This commit is contained in:
@@ -26,5 +26,6 @@ type DocModel struct {
|
||||
RouterPath string
|
||||
Methods []string
|
||||
Note string
|
||||
MethodName string
|
||||
Req, Resp *StructInfo
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ func NewDoc(group string) *model {
|
||||
}
|
||||
|
||||
// 添加一个
|
||||
func (m *model) AddOne(group string, routerPath string, methods []string, note string, req, resp *StructInfo) {
|
||||
func (m *model) AddOne(group, methodName, routerPath string, methods []string, note string, req, resp *StructInfo) {
|
||||
if m.MP[group] == nil {
|
||||
m.MP[group] = make(map[string]DocModel)
|
||||
}
|
||||
@@ -37,6 +37,7 @@ func (m *model) AddOne(group string, routerPath string, methods []string, note s
|
||||
Note: note,
|
||||
Req: req,
|
||||
Resp: resp,
|
||||
MethodName: methodName,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +113,7 @@ func (m *model) GenMarkdown(outPath string) {
|
||||
|
||||
sub.Methods = v1.Methods
|
||||
sub.Note = v1.Note
|
||||
sub.InterfaceName = v1.RouterPath
|
||||
sub.InterfaceName = v1.MethodName
|
||||
sub.RouterPath = buildRelativePath(myswagger.GetHost(), buildRelativePath(m.Group, v1.RouterPath))
|
||||
tmp.Item = append(tmp.Item, sub)
|
||||
}
|
||||
|
Reference in New Issue
Block a user