fos_rest: param_fetcher_listener: enabled: true cache_dir: '%kernel.cache_dir%/fos_rest' routing_loader: false body_converter: enabled: false serializer: serialize_null: true view: formats: json: true xml: false view_response_listener: enabled: true failed_validation: 400 exception: enabled: true map_exception_codes: true serializer_error_renderer: true codes: 'Symfony\Component\HttpKernel\Exception\BadRequestHttpException': 400 'App\Validator\ValidationFailedException': 400 'Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException': 401 'Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException': 403 'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': 404 'App\API\NotFoundException': 404 body_listener: enabled: true decoders: json: fos_rest.decoder.jsontoform array_normalizer: service: fos_rest.normalizer.camel_keys forms: true format_listener: enabled: true rules: - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json ] } zone: - { path: ^/api/* }