fix: swagger separator incorrect in Windows OS (#4799)

This commit is contained in:
kesonan
2025-04-23 21:51:02 +08:00
committed by GitHub
parent 94e7753262
commit bf313c3c56

View File

@@ -1,7 +1,6 @@
package swagger
import (
"path/filepath"
"strings"
"time"
@@ -279,7 +278,7 @@ func pathVariable2SwaggerVariable(path string) string {
resp = append(resp, v)
}
}
return "/" + filepath.Join(resp...)
return "/" + strings.Join(resp, "/")
}
func wrapCodeMsgProps(properties spec.SchemaProps, api apiSpec.Info) spec.SchemaProps {