mirror of
https://github.com/BishopFox/sj.git
synced 2026-11-10 01:41:27 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75da0224d3 | ||
|
|
540d6064dc |
No files matched your search
+4
-4
@@ -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
@@ -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
@@ -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://", "")
|
||||
|
||||
Reference in new issue
Block a user