docs: function (scope, cb) {
  
      // scope.args are the raw command line arguments.
      //
      // e.g. if someone runs:
      // $ sails generate controller-ts user find create update
      // then `scope.args` would be `['user', 'find', 'create', 'update']`
      if (!scope.args[0]) {
        return cb( 'Usage: sails generate controller-ts <controllername>' );
      }
  
      if (!scope.rootPath) {
        return cb( INVALID_SCOPE_VARIABLE('rootPath') );
      }
  
      // Ensure that the command is ran from root.
      if (!isValidRoot(scope.rootPath)) {
        return cb( INVALID_ROOT_PATH() );
      }
  
      // Ensure that the name is valid
      if (!isValidName(scope.args[0])) {
        return cb( INVALID_NAME() );
      }
  
      checkMissingDefinitions(scope.rootPath);
      
      // Attach defaults
      _.defaults(scope, {
        createdAt: new Date()
      });
  
      // Limit controller name correctly.
      var capitalizedName = capitalize(scope.args[0]);
      scope.controllerName = capitalizedName + 'Controller';
      // Pluralize item.
      scope.modelName = pluralize(capitalizedName);
  
      if (doesControllerExist(scope.rootPath, scope.controllerName)) {
        return cb( ALREADY_EXISTS(scope.controllerName) );
      }
  
      // Decide the output filename for use in targets below:
      scope.filename = '/api/controllers/' + scope.controllerName + '.ts';
  
      cb();
    }