# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest:
    body_converter:
        enabled: true
        validate: true
    routing_loader:
        default_format: json
        include_format: false
    param_fetcher_listener: true
    view:
        default_engine: null
        view_response_listener:
            enabled: true
            force: true
        failed_validation: HTTP_BAD_REQUEST
        formats:
            html: true
            json: true
    access_denied_listener:
        json: true
    exception:
        codes:
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
            'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
            'InvalidArgumentException': 400
        messages:
            'InvalidArgumentException': true
            'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': true
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
