FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.8k stars 702 forks source link

Serialize null for specific controller #2259

Open GinoPane opened 4 years ago

GinoPane commented 4 years ago

Hi guys! There's an option serialize_null which is applied globally.

fos_rest:
   serializer:
     serialize_null: true

But what if I want to set it to true for a specific controller only?

Right now I have to do this:

image

Is there maybe a config-based way?

Thanks.