lib/request-metadata.js
function swaggerApiMetadata (req, res, next) {
    // Only set req.swagger.api if the request is under the API's basePath
    if (context.api) {
      let basePath = util.normalizePath(context.api.basePath, router);
      let reqPath = util.normalizePath(req.path, router);
      if (_.startsWith(reqPath, basePath)) {
        req.swagger.api = context.api;
      }
    }

    next();
  }
function swaggerApiMetadata (req, res, next) {
    // Only set req.swagger.api if the request is under the API's basePath
    if (context.api) {
      let basePath = util.normalizePath(context.api.basePath, router);
      let reqPath = util.normalizePath(req.path, router);
      if (_.startsWith(reqPath, basePath)) {
        req.swagger.api = context.api;
      }
    }

    next();
  }
function swaggerApiMetadata ( req , res , next ) { // Only set req.swagger.api if the request is under the API's basePath if ( context . api ) { let basePath = util . normalizePath ( context . api . basePath , router ) ; let reqPath = util . normalizePath ( req . path , router ) ; if ( _ . startsWith ( reqPath , basePath ) ) { req . swagger . api = context . api ; } } next ( ) ; }
Sets `req.swagger.api`
Sets req . swagger . api