code: function parsePathParams (req, res, next) {
      if (util.isSwaggerRequest(req)) {
        req.pathParams = {};
  
        if (req.swagger.pathName.indexOf("{") >= 0) {
          // Convert the Swagger path to a RegExp
          let paramNames = [];
          let pathPattern = req.swagger.pathName.replace(util.swaggerParamRegExp, (match, paramName) => {
            paramNames.push(paramName);
            return "([^\/]+)";
          });
  
          // Exec the RegExp to get the path param values from the URL
          let values = new RegExp(pathPattern + "\/?$", "i").exec(req.path);
  
          // Parse each path param
          for (let i = 1; i < values.length; i++) {
            let paramName = paramNames[i - 1];
            let paramValue = decodeURIComponent(values[i]);
            let param = _.find(req.swagger.params, { in: "path", name: paramName });
  
            util.debug('    Parsing the "%s" path parameter', paramName);
            req.pathParams[paramName] = paramParser.parseParameter(param, paramValue, param);
          }
        }
      }
  
      next();
    }
docs: Parses all Swagger path parameters and sets `req.pathParams`.
  NOTE: This middleware cannot set `req.params`.  That requires special path-param middleware (see above)