mirror of
https://github.com/BishopFox/sj.git
synced 2026-11-07 17:08:08 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09c460e768 |
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.2",
|
||||
Version: "2.0.3",
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
||||
+2
-3
@@ -205,7 +205,7 @@ func BuildRequestsFromPaths(spec map[string]interface{}, client http.Client) {
|
||||
|
||||
}
|
||||
|
||||
if strings.Contains(curl, "-d") {
|
||||
if strings.Contains(curl, "-d '") {
|
||||
bodyData += fmt.Sprintf("&%s=%s", propertyItem, pValue)
|
||||
curl = strings.TrimSuffix(curl, "'")
|
||||
curl += fmt.Sprintf("&%s=%s'", propertyItem, pValue)
|
||||
@@ -213,7 +213,6 @@ func BuildRequestsFromPaths(spec map[string]interface{}, client http.Client) {
|
||||
bodyData += fmt.Sprintf("%s=%s", propertyItem, pValue)
|
||||
curl += fmt.Sprintf(" -d '%s=%s'", propertyItem, pValue)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +241,7 @@ func BuildRequestsFromPaths(spec map[string]interface{}, client http.Client) {
|
||||
case "header":
|
||||
curl += fmt.Sprintf(" -H \"%s: %s\"", name, pValue)
|
||||
case "body":
|
||||
if strings.Contains(curl, "-d") {
|
||||
if strings.Contains(curl, "-d '") {
|
||||
bodyData += fmt.Sprintf("&%s=%s", name, pValue)
|
||||
curl = strings.TrimSuffix(curl, "'")
|
||||
curl += fmt.Sprintf("&%s=%s'", name, pValue)
|
||||
|
||||
Reference in new issue
Block a user