Compare commits

...
2 Commits
3 changed files with 10 additions and 6 deletions

No files matched your search

+4 -4
View File
@@ -32,11 +32,11 @@ changelog:
- "^docs:"
- "^test:"
groups:
- title: New Features
regexp: '(?i)^add(?:s|ed|ing)?'
- title: "New Features"
regexp: '^(Add|add)(s|ed|ing)?'
order: 0
- title: "Bug Fixes"
regexp: '(?i)^fix(?:es|ed|ing)?'
regexp: '^(Fix|fix)(es|ed|ing)?'
order: 1
- title: Others
- title: "Others"
order: 999
+1 -1
View File
@@ -46,7 +46,7 @@ $ sj brute -u https://petstore.swagger.io`,
log.Error("Command not specified. See the --help flag for usage.")
}
},
Version: "1.4.0",
Version: "1.4.2",
}
func Execute() {
+5 -1
View File
@@ -277,7 +277,7 @@ func GenerateRequests(bodyBytes []byte, client http.Client) []string {
for k := range newDoc.Paths {
if !pathMap[k] {
paths = append(paths, k)
paths = append(paths, basePathResult+k)
pathMap[k] = true
}
}
@@ -340,6 +340,10 @@ func GetBasePath(servers openapi3.Servers, host string) (bp string) {
basePath = "/"
} else {
basePath = servers[0].URL
if strings.Contains(host, ":") {
hostPortStart := strings.Index(host, ":")
host = host[0:hostPortStart]
}
if strings.Contains(basePath, host) || strings.Contains(basePath, "http") {
basePath = strings.ReplaceAll(basePath, host, "")
basePath = strings.ReplaceAll(basePath, "http://", "")