Everything is in the title.
Here are 2 screenshots to illustrate (the route is GET users/{id}) :
Expected :
Actual :
How to fix it
There is a property called skip_null_values which should be set to false in the normalization_context of the call to ApiResource in the entities.
Here is a screenshot of a fixed file and of a non-fixed file (Entity/User.php) :
Fixed :
Actual :
Description
Everything is in the title. Here are 2 screenshots to illustrate (the route is
GET users/{id}
) : Expected : Actual :How to fix it
There is a property called
skip_null_values
which should be set to false in thenormalization_context
of the call toApiResource
in the entities. Here is a screenshot of a fixed file and of a non-fixed file (Entity/User.php) : Fixed : Actual :