mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Fixed #890
This commit is contained in:
parent
5533ed424a
commit
6d822eb802
@ -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, '');
|
||||
}
|
||||
|
||||
@ -9,5 +9,5 @@ export function getServer(openApi: OpenApi): string {
|
||||
url = url.replace(`{${variable}}`, variables[variable].default);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
return url.replace(/\/$/g, '');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user