Open
Description
API Platform version(s) affected: 2.6.3
Description
As mentioned in summary there is an issue with getting data form Elasticsearch. It reproduced when I tried to get data for fields that composed of several words (ex. firstName, createdAt etc.) Result the same for jsonld and graphql normalizers and for nested objects as well.
How to reproduce
- Enable support for Elasticsearch
- Create model and field with two words name
- Store some data
- Try to get data by using jsonld or graphql formats
- Result for fields with two words name will be empty
Possible Solution
There is could be a bug with comparing allowedAttributes to attributes from ES result. Method getAllowedAttributes of AbstractObjectNormalizer returns allowed attributes in camel case whereas attributes in ES source wrote in snake_case