Api-platform: [Bug] MetadataAwareNameConverter name converter not working

Created on 29 Mar 2019  路  3Comments  路  Source: api-platform/api-platform

Hello,
I just upgraded from ApiPlatform 2.4 beta.1 to Api Platform 2.4.2 and the name converter is broken.
Before, the MetadataAwareNameConverter service was used, as per the documentation, and my properties were serialized using camelCase.
Now, they are serialized using snake_case while I didn't do any changes to my application.
I tried putting the serializer.name_converter.metadata_aware service both in the symfony serializer configuration and in the api platform configuration, but if I do so I get a Circular reference detected for service "serializer.name_converter.metadata_aware exception. I also tried with the api_platform.name_converter alias and still the same error...
What happened?It worked perfectly before...

EU-FOSSA Hackathon bug

Most helpful comment

I managed to get camelCase working again by using this in the api platform configuration:
name_converter: 'Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter'

Still, the docs say that this should be the default and it clearly isn't anymore...

All 3 comments

I managed to get camelCase working again by using this in the api platform configuration:
name_converter: 'Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter'

Still, the docs say that this should be the default and it clearly isn't anymore...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zspine picture zspine  路  3Comments

maximilienGilet picture maximilienGilet  路  3Comments

dunglas picture dunglas  路  3Comments

MLKiiwy picture MLKiiwy  路  4Comments

achref-riahi picture achref-riahi  路  3Comments