0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-01-26 17:58:54 +00:00
kevinpapst_kimai2/config/packages/fos_rest.yaml
Kevin Papst 0e91dd886e
release 2.0 beta 2 (#3757)
* do not traverse into invoice template subdirectories (#3735)
* fix security open api definition
* fix currency can be null, removed fluent interface
* merged release 1.30.3
* allow to pre-fill timesheet metafields via URL
* fix api description
* added test accounts with simpler names and password
* upgrade to Symfony 6.2
* removed FrameworkExtraBundle (by Sensio) and replaced with new native SF annotations
* fixed symfony 6.2 deprecations
* fixed #3768
2023-01-18 14:47:48 +01:00

41 lines
1.4 KiB
YAML

fos_rest:
param_fetcher_listener:
enabled: true
cache_dir: '%kernel.cache_dir%/fos_rest'
routing_loader: false
body_converter:
enabled: false
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
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.jsontoform
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/* }