code: function getBase (request, extra) {
    var parts = request.originalUrl.split('/');
    // Remove extra path parts.
    parts.splice(-extra, extra);
    return request.protocol + '://' + request.headers.host + parts.join('/');
  }
docs: __Private Module Members__ Figure out the basePath for Swagger API definition