mirror of
https://github.com/xxjwxc/public.git
synced 2025-09-26 20:01:19 +08:00
fix
This commit is contained in:
@@ -97,7 +97,7 @@ func (m *model) GenMarkdown(outPath string) {
|
||||
|
||||
sub.Methods = v1.Methods
|
||||
sub.Note = v1.Note
|
||||
sub.RouterPath = buildRelativePath(m.Group, v1.RouterPath)
|
||||
sub.RouterPath = buildRelativePath(myswagger.GetHost(), buildRelativePath(m.Group, v1.RouterPath))
|
||||
tmp.Item = append(tmp.Item, sub)
|
||||
}
|
||||
jsonsrc := doc.GenMarkdown(tmp)
|
||||
|
@@ -30,6 +30,11 @@ func SetHost(h string) {
|
||||
host = h
|
||||
}
|
||||
|
||||
// GetHost 获取host
|
||||
func GetHost() string {
|
||||
return schemes[0] + "://" + host
|
||||
}
|
||||
|
||||
// SetBasePath set basePath
|
||||
func SetBasePath(b string) {
|
||||
if !strings.HasPrefix(b, "/") {
|
||||
|
Reference in New Issue
Block a user