Skip to content

Commit 6d822eb

Browse files
committed
1 parent 5533ed4 commit 6d822eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/openApi/v2/parser/getServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export function getServer(openApi: OpenApi): string {
88
const scheme = openApi.schemes?.[0] || 'http';
99
const host = openApi.host;
1010
const basePath = openApi.basePath || '';
11-
return host ? `${scheme}://${host}${basePath}` : basePath;
11+
const url = host ? `${scheme}://${host}${basePath}` : basePath;
12+
return url.replace(/\/$/g, '');
1213
}

src/openApi/v3/parser/getServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export function getServer(openApi: OpenApi): string {
99
url = url.replace(`{${variable}}`, variables[variable].default);
1010
}
1111
}
12-
return url;
12+
return url.replace(/\/$/g, '');
1313
}

0 commit comments

Comments
 (0)