Move configuration into the rigth files.
[Project_proches_de_moi-server.git] / config / packages / fos_rest.yaml
CommitLineData
dec6d031
JB
1# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
2fos_rest: ~
3# param_fetcher_listener: true
4# allowed_methods_listener: true
5# routing_loader: true
6# view:
7# view_response_listener: true
8# exception:
9# codes:
10# App\Exception\MyException: 403
11# messages:
12# App\Exception\MyException: Forbidden area.
13# format_listener:
14# rules:
15# - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }
9b636c8d
JB
16
17 routing_loader:
18 include_format: false
19 view:
20 view_response_listener: true
21 mime_types:
22 json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
23 format_listener:
24 rules:
25 - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
26 body_listener:
27 enabled: true
28 versioning:
29 enabled: true
30 resolvers:
31 media_type: # Accept header
32 enabled: true
33 regex: '/(v|version)=(?P<version>[0-9\.]+)/'