fos_rest:
    param_fetcher_listener: true
    body_listener: true
    format_listener:
        enabled: true
        rules:
            #- { path: '^/api/', priorities: ['json', 'xml'], fallback_format: 'html', prefer_extension: false }
            - { path: ^/api/, priorities: [ json, xml ], fallback_format: ~, prefer_extension: true }
            - { path: '^/', priorities: [ 'html', '*/*'], fallback_format: html, prefer_extension: true }
    versioning: true
    view:
        view_response_listener: 'force'        
        formats:
            json: true
            xml: true
        mime_types:
            json: ['application/json', 'application/x-json']