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

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

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

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