diff --git a/tools/goctl/api/swagger/swagger.go b/tools/goctl/api/swagger/swagger.go index 042d82d48..fc65bf2d3 100644 --- a/tools/goctl/api/swagger/swagger.go +++ b/tools/goctl/api/swagger/swagger.go @@ -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 {