Bundle to globally define skip_null_values parameter on all entities for ApiPlatform.
Install ApiPlatformSkipNullBundle library using Composer:
composer require bigchicchicken/api-platform-skip-null-bundle
Add/Check activation in the file config/bundles.php
:
// config/bundles.php
return [
// ...
ApiPlatformSkipNullBundle\ApiPlatformSkipNullBundle::class => ['all' => true],
];
Configure the bundle:
# config/packages/api_platform_skip_null.yaml
api_platform_skip_null:
enabled: true|false # (Default: true)
This is completely free and released under the MIT License.