samples/sample3/handlers/employees.js
function loadMockData(server, next) {
  // Create REST resources for each employee
  var resources = data.employees.map(function(employee) {
    return new swagger.Resource('/employees', employee.username, employee);
  });

  // Save the resources to the mock data store
  server.dataStore.save(resources, next);
}
function loadMockData(server, next) {
  // Create REST resources for each employee
  var resources = data.employees.map(function(employee) {
    return new swagger.Resource('/employees', employee.username, employee);
  });

  // Save the resources to the mock data store
  server.dataStore.save(resources, next);
}
function loadMockData ( server , next ) { // Create REST resources for each employee var resources = data . employees . map ( function ( employee ) { return new swagger . Resource ( '/employees' , employee . username , employee ) ; } ) ; // Save the resources to the mock data store server . dataStore . save ( resources , next ) ; }
Loads mock employee data

@param {SwaggerServer} server
@param {function} next
Loads mock employee data