docs: function (context, callback) {
              var self = this,
                  options,
                  offset = 0,
                  limit = 0,
                  items,
                  parameters = context.request.urlInfo.parameter;
  
              flow()
                  .seq("collection", function (cb) {
                      self._findCollection(context, cb, false);
                  })
                  .seq("query", function (cb) {
                      var query = self.$restHandler.parseQueryForResource(parameters, self);
                      if (!query.query.sort) {
                          // use default sorting
                          var configuration = context.dataSource.getConfigurationForModelClass(this.vars.collection.$modelFactory);
                          if (configuration && configuration.$.defaultSorting) {
                              query.sort(configuration.$.defaultSorting);
                          }
                      }
                      self._modifyCollectionQuery(query, cb);
                  })
                  .seq("page", function (cb) {
  
                      this.vars.collection = this.vars.collection.query(this.vars.query);
                      var pageSize = context.dataSource.$.collectionPageSize;
  
                      if (parameters["limit"]) {
                          limit = parseInt(parameters["limit"]);
                      }
  
                      if (!limit || isNaN(limit)) {
                          limit = 100;
                      }
  
                      if (parameters["offset"]) {
                          offset = parseInt(parameters["offset"]);
                      }
  
                      // calculate page
                      limit = limit > pageSize ? pageSize : limit;
  
                      this.vars.collection.fetch({limit: limit, offset: offset}, cb);
                  })
                  .exec(function (err, results) {
                      if (!err) {
                          var response = context.response;
  
                          // switch context of collection to RestDataSource
                          var collection = results["collection"];
                          items = results["page"].$items;
                          // call compose
                          var processor = self.$restHandler.$restDataSource.getProcessorForCollection(collection);
  
                          items.forEach(function (item) {
                              var id = item.identifier();
                              if (id) {
                                  self._fetchAllHrefsForModel(item, context);
                              }
                          });
  
                          var itemArray = processor.composeCollection(results["page"], "GET", null);
  
                          var res = {
                              count: results["collection"].$.$itemsCount,
                              limit: limit,
                              offset: offset,
                              results: itemArray
                          };
  
                          response.writeHead(200, "", {
                              'Content-Type': 'application/json; charset=utf-8'
                          });
  
                          response.write(JSON.stringify(res), 'utf8');
                          response.end();
  
                          callback(null);
                      } else {
                          if (!(err instanceof HttpError)) {
                              var statusCode = 404;
                              if (err === DataSource.ERROR.NOT_FOUND) {
                                  statusCode = 404;
                              }
                              err = new HttpError(err, statusCode);
                          }
                          callback(err);
                      }
  
  
                  });
          }