Skip to content

Commit ca1623a

Browse files
committed
typo in swagger basepath generate
1 parent c68857a commit ca1623a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swagger/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ swagger._getSwaggerBase = () => {
1717
let basePath, host, protocol
1818
if (jsonApi._apiConfig.urlPrefixAlias) {
1919
const urlObj = url.parse(jsonApi._apiConfig.urlPrefixAlias)
20-
basePath = basePath.replace(/(?!^\/)\/$/, '')
20+
basePath = urlObj.pathname.replace(/(?!^\/)\/$/, '')
2121
host = urlObj.host
2222
protocol = urlObj.protocol.replace(/:$/, '')
2323
} else {

0 commit comments

Comments
 (0)