code: function sendResponse (req, res, next, dataStore) {
    return function (err, resources) {
      if (!err) {
        util.debug("%s successfully updated", res.swagger.location);
  
        if (resources.length > 0) {
          // Determine the max "modifiedOn" date of the resources
          res.swagger.lastModified = _.max(resources, "modifiedOn").modifiedOn;
        }
        else {
          // There is no data, so use the current date/time as the "last-modified" header
          res.swagger.lastModified = new Date();
        }
  
        // Extract the "data" of each Resource
        resources = _.map(resources, "data");
      }
  
      // Set the response body (unless it's already been set by other middleware)
      if (err || res.body) {
        next(err);
      }
      else if (!res.swagger.isCollection) {
        // Response body is a single value, so only return the first item that was edited
        res.body = _.first(resources);
        next();
      }
      else {
        // Response body is the entire collection (new, edited, and old)
        dataStore.getCollection(req.path, (err, collection) => {
          res.body = _.map(collection, "data");
          next(err);
        });
      }
    };
  }
docs: Returns a function that sends the correct response for the operation.
  
  @param   {Request}       req
  @param   {Response}      res
  @param   {function}      next
  @param   {DataStore}     dataStore