mirror of
https://github.com/BishopFox/sj.git
synced 2026-11-07 10:26:01 -10:00
Fixed improper handling of base path
This commit is contained in:
1 parent
a77f9f46bb
commit
8e2e5fbebc
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -49,7 +49,7 @@ $ sj convert -u https://petstore.swagger.io/v2/swagger.json -o openapi.json`,
|
||||
log.Error("Command not specified. See the --help flag for usage.")
|
||||
}
|
||||
},
|
||||
Version: "2.0.3",
|
||||
Version: "2.0.4",
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
||||
@@ -96,6 +96,8 @@ func GenerateRequests(bodyBytes []byte, client http.Client) {
|
||||
if serverURL, ok := srv["url"].(string); ok {
|
||||
if strings.Contains(serverURL, "://") {
|
||||
apiTarget = serverURL
|
||||
} else if serverURL == "/" {
|
||||
basePath = ""
|
||||
} else {
|
||||
basePath = serverURL
|
||||
apiTarget = u.Scheme + "://" + u.Host
|
||||
|
||||
Reference in new issue
Block a user