This commit is contained in:
Ferdi Koomen 2021-11-26 14:55:31 -05:00
parent 5533ed424a
commit 6d822eb802
2 changed files with 3 additions and 2 deletions

View File

@ -8,5 +8,6 @@ export function getServer(openApi: OpenApi): string {
const scheme = openApi.schemes?.[0] || 'http';
const host = openApi.host;
const basePath = openApi.basePath || '';
return host ? `${scheme}://${host}${basePath}` : basePath;
const url = host ? `${scheme}://${host}${basePath}` : basePath;
return url.replace(/\/$/g, '');
}

View File

@ -9,5 +9,5 @@ export function getServer(openApi: OpenApi): string {
url = url.replace(`{${variable}}`, variables[variable].default);
}
}
return url;
return url.replace(/\/$/g, '');
}