You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
881 B
23 lines
881 B
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
|
|
fos_rest:
|
|
disable_csrf_role: ROLE_API
|
|
param_fetcher_listener: true
|
|
body_listener: true
|
|
# allowed_methods_listener: true
|
|
# routing_loader: true
|
|
view:
|
|
view_response_listener: force
|
|
exception:
|
|
enabled: true
|
|
codes:
|
|
'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
|
|
'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
|
|
messages:
|
|
'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
|
|
format_listener:
|
|
rules:
|
|
- { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, xml ] }
|
|
- { path: ^/, prefer_extension: true, fallback_format: html, priorities: [ html ] }
|
|
serializer:
|
|
groups: ['Default']
|