lib/request-metadata.js
function getRelativePath (req) {
  if (!req.swagger.api.basePath) {
    return req.path;
  }
  else {
    return req.path.substr(req.swagger.api.basePath.length);
  }
}
function getRelativePath (req) {
  if (!req.swagger.api.basePath) {
    return req.path;
  }
  else {
    return req.path.substr(req.swagger.api.basePath.length);
  }
}
function getRelativePath ( req ) { if ( ! req . swagger . api . basePath ) { return req . path ; } else { return req . path . substr ( req . swagger . api . basePath . length ) ; } }
Returns the HTTP request path, relative to the Swagger API's basePath.

@param   {Request}   req
@returns {string}
Returns the HTTP request path relative to the Swagger API s basePath .