sensio_framework_extra:
    view: { annotations: false }

fos_rest:
    disable_csrf_role: ROLE_API
    param_fetcher_listener: true
    view:
        view_response_listener: 'force'
        formats:
            xml:  true
            json: true
        templating_formats:
            html: true
    format_listener:
        rules:
            - { path: ^/, priorities: [ html, json, xml ], fallback_format: ~, prefer_extension: true }
    exception:
        codes:
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
            'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
        messages:
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
    allowed_methods_listener: true
    access_denied_listener:
        json: true
    body_listener: true

fos_http_cache:
    cache_control:
        rules:
            # the controls section values are used in a call to Response::setCache();
            -
                match:
                    path: ^/notes
                    methods: [GET, HEAD]
                headers:
                    cache_control: { public: true, max_age: 15, s_maxage: 30 }
                    last_modified: "-1 hour"
                    vary: [Accept-Encoding, Accept-Language]
bazinga_rest_extra:
    link_request_listener: true

sensio_framework_extra:
    view: { annotations: false }

fos_rest:
    disable_csrf_role: ROLE_API
    param_fetcher_listener: true
    view:
        view_response_listener: 'force'
        formats:
            xml:  true
            json: true
        templating_formats:
            html: true
    format_listener:
        rules:
            - { path: ^/, priorities: [ html, json, xml ], fallback_format: ~, prefer_extension: true }
    exception:
        codes:
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
            'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
        messages:
            'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
    allowed_methods_listener: true
    access_denied_listener:
        json: true
        xml: true
    body_listener: true

bazinga_rest_extra:
    link_request_listener: true

Remove http cache config; add access denied listener to xml format
Remove http cache config; add access denied listener to xml format
