This commit is contained in:
Philip Cheung 2024-10-07 18:24:21 +08:00
parent 01a6236264
commit ec1efb4189
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
const encoder = config.ENCODE_PATH || encodeURI
const path = options.url
.replace("{http", "https")
.replace("{api-version}", config.VERSION)
.replace(/{(.*?)}/g, (substring: string, group: string) => {
if (options.path?.hasOwnProperty(group)) {