feature/fix_tag #7

Merged
zhangdeman merged 2 commits from feature/fix_tag into master 2025-02-16 13:16:23 +08:00
Showing only changes of commit d23a5651af - Show all commits

View File

@ -725,5 +725,24 @@ func (g *Generate) parseBaseUriConfig(uriPrefix string, paramType reflect.Type)
if res.Uri == "" {
return nil, errors.New("baseCfg.Uri is empty")
}
if nil == g.docData.Tags {
g.docData.Tags = make([]*define.TagItem, 0)
}
// 增加tag
for _, itemTag := range res.TagList {
exist := false
for _, t := range g.docData.Tags {
if itemTag == t.Name {
exist = true
break
}
}
if !exist {
g.docData.Tags = append(g.docData.Tags, &define.TagItem{
Name: itemTag,
Description: itemTag,
})
}
}
return res, nil
}