code: function generate(opt) {
    if (!opt) {
      throw new Error('\'option\' is required.');
    }
  
    if (!opt.swaggerUI) {
      throw new Error('\'swaggerUI\' is required.');
    }
  
    if (!opt.basePath) {
      throw new Error('\'basePath\' is required.');
    }
  
    descriptor.basePath = opt.basePath;
    descriptor.apiVersion = (opt.apiVersion) ? opt.apiVersion : '1.0';
    descriptor.swaggerVersion = (opt.swaggerVersion) ? opt.swaggerVersion : '1.0';
    descriptor.swaggerURL = (opt.swaggerURL) ? opt.swaggerURL : '/swagger';
    descriptor.swaggerJSON = (opt.swaggerJSON) ? opt.swaggerJSON : '/api-docs.json';
    descriptor.apis = [];
  
    if (opt.info) {
      descriptor.info = opt.info;
    }
  
    opt.apiVersion = descriptor.apiVersion;
    opt.swaggerVersion = descriptor.swaggerVersion;
    opt.swaggerURL = descriptor.swaggerURL;
    opt.swaggerJSON = descriptor.swaggerJSON;
  
    if (!opt.fullSwaggerJSONPath) {
      opt.fullSwaggerJSONPath = url.parse(opt.basePath + opt.swaggerJSON).path;
    }
  
    if (opt.apis) {
      opt.apis.forEach(function(api) {
        readApi(api, function(err) {
          if (err) {
            throw err;
          }
        });
      });
    }
  }
docs: Generate Swagger documents
  @api    private
  @param  {Object} opt