Files
kimai2/config/packages/fos_rest.yaml
Kevin Papst 26c2d5aa81 prepare release 1.12 (#2183)
* updated dependencies (#2125)
* display application name and version in console (#2150)
2020-12-10 16:25:14 +01:00

53 lines
1.7 KiB
YAML

fos_rest:
param_fetcher_listener:
enabled: true
cache_dir: '%kernel.cache_dir%/fos_rest'
routing_loader: false
body_converter:
enabled: true
serializer:
serialize_null: true
view:
formats:
json: true
xml: false
view_response_listener:
enabled: true
failed_validation: 400
exception:
enabled: true
map_exception_codes: true
serializer_error_renderer: true
serialize_exceptions: false
exception_listener: false
codes:
'Symfony\Component\HttpKernel\Exception\BadRequestHttpException': 400
'App\Validator\ValidationFailedException': 400
'Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException': 401
'Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException': 403
'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': 404
'App\API\NotFoundException': 404
body_listener:
enabled: true
decoders:
json: fos_rest.decoder.json
array_normalizer:
service: fos_rest.normalizer.camel_keys
forms: true
format_listener:
enabled: true
rules:
- { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json ] }
zone:
- { path: ^/api/* }
handcraftedinthealps_rest_routing:
routing_loader:
default_format: 'json'
prefix_methods: true
include_format: true
formats:
json: true
xml: false