code: function (basePath, apiPath) {
    basePath = parseurl({url: basePath || '/'}).pathname || '/';
  
    // Make sure the base path starts with '/'
    if (basePath.charAt(0) !== '/') {
      basePath = '/' + basePath;
    }
  
    // Make sure the base path ends with '/'
    if (basePath.charAt(basePath.length - 1) !== '/') {
      basePath = basePath + '/';
    }
  
    // Make sure the api path does not start with '/' since the base path will end with '/'
    if (apiPath.charAt(0) === '/') {
      apiPath = apiPath.substring(1);
    }
  
    // Replace Swagger syntax for path parameters with Express' version (All Swagger path parameters are required)
    return (basePath + apiPath).replace(/{/g, ':').replace(/}/g, '');
  }
docs: Helper functions