code: function filter(data, route) {
  
      var res = this
      ,   statusCode = res.statusCode
      ,   validator = route.Router.App.getValidator()
      ,   schemaId
      ,   schema;
  
      if (!statusCode) {
          statusCode = 200;
      }
  
      if (!route.description.responses.hasOwnProperty(statusCode)
          || !route.description.responses[statusCode].length
          || !route.description.responses[statusCode][0].schema
      ) {
          throw new Error(`There is no response data format set for status code: ${statusCode}. Can't filter response data`);
      }
  
      if (!_.isPlainObject(data) && data && data.toJSON instanceof Function) {
          data = data.toJSON();
      }
  
      schema = route.description.responses[statusCode][0].schema;
  
      if (typeof schema === 'string') {
          schemaId = schema;
      } else {
          schemaId = route.uid + '-RES';//req response schema
  
          if (!validator.getSchema(schemaId)) {
              validator.addSchema(schema, schemaId);
          }
      }
  
      if (!validator.validate(schemaId, data)) {
          let err = validator.errors.shift();
          if (err && !err.dataPath) {
              err.dataPath = '<response>';
          }
          throw new Response.ValidationError(err);
      }
  
      return new Proxy(res, {
          get: function(target, name, receiver) {
              if (proxyResponsePrototypeProps.hasOwnProperty(name)) {
                  if (proxyResponsePrototypeProps[name]) {
                      return function() {
                          target[name](data);
                          return receiver;
                      };
                  }
  
                  return Reflect.get(target, name, receiver);
              }
          }
      });
  }
docs: filters received data according to json-inspector schema which has been staticaly
  set via the `route.respondsWith(schema)`. Returned wrapped response object has
  a constrain set so it can respond only with the filtered data.
  
  @param {mixin} data
  @param {Route} route
  
  @private
  @throws {ValidationError}
  @this {Response} - object with express res object as its prototype
  @return {Object} - wrapper around response object with explicitly set res data