/**
  * @param Http\Request\Parameters\Fields $fields
  */
 protected function filterOutResourceFields(Fields $fields)
 {
     if (false === $fields->isEmpty()) {
         foreach ($fields->get() as $type => $properties) {
             foreach ($this->serializationStrategy->getMappings() as $mapping) {
                 if ($mapping->getClassAlias() === $type) {
                     $mapping->setFilterKeys($properties);
                 }
             }
         }
     }
 }
 /**
  * @param Request $request
  */
 private function filterOutResourceFields(Request $request)
 {
     if ($filters = $request->getFields()) {
         foreach ($filters as $type => $properties) {
             foreach ($this->serializationStrategy->getMappings() as $mapping) {
                 if ($mapping->getClassAlias() === $type) {
                     $mapping->setFilterKeys($properties);
                 }
             }
         }
     }
 }