# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest:
  routing_loader:
    default_format: json
    include_format: false
  body_listener: true
  format_listener:
    rules:
      - { path: ^/api/, priorities: [ json ], fallback_format: json, prefer_extension: true }
      - { path: '^/', priorities: [ 'text/html', '*/*'], fallback_format: html, prefer_extension: true }
  param_fetcher_listener: true
  access_denied_listener:
    json: true
  view:
    view_response_listener: 'force'
    formats:
      json: true