summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole3/backend/config/packages/fos_rest.yaml
blob: ebce663d832c4916815628665ff077c472660ef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest:
  serializer:
    serialize_null: true
  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
  body_converter:
    enabled: true
    validate: true
    #array_normalizer: fos_rest.normalizer.camel_keys
  disable_csrf_role: ROLE_API
  routing_loader:
    default_format: json