Skip to content

Commit

Permalink
chore(rest): review - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Dec 3, 2018
1 parent a99ad6a commit 55656a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/rest/src/rest.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,9 @@ export class RestServer extends Context implements Server, HttpServerLike {

if (specObj.servers && this._basePath) {
for (const s of specObj.servers) {
if (s.url.startsWith('/')) {
s.url = s.url === '/' ? this._basePath : this._basePath + s.url;
// Update the default server url to honor `basePath`
if (s.url === '/') {
s.url = this._basePath;
}
}
}
Expand Down

0 comments on commit 55656a8

Please sign in to comment.