Skip to content

Commit

Permalink
Merge pull request #80 from ms-henglu/windows-generator-issue
Browse files Browse the repository at this point in the history
[generate] - Fix error of not able to read example files in Windows
  • Loading branch information
ms-henglu authored Nov 2, 2023
2 parents 73df7c3 + 58b5572 commit 9ec73ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion swagger/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"net/http"
"path"
"path/filepath"
"sort"
"strings"

Expand Down Expand Up @@ -73,7 +74,7 @@ func Load(swaggerPath string) ([]ApiPath, error) {
if exampleRef == nil {
continue
}
exampleList = append(exampleList, path.Clean(path.Join(swaggerPath, "..", exampleRef.(string))))
exampleList = append(exampleList, path.Clean(path.Join(filepath.ToSlash(swaggerPath), "..", exampleRef.(string))))
}
}
}
Expand Down

0 comments on commit 9ec73ca

Please sign in to comment.