+++ /dev/null
-#config/config.yml
-
-framework:
- serializer:
- enabled: true
-
-fos_rest:
- routing_loader:
- include_format: false
- view:
- view_response_listener: true
- mime_types:
- json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
- format_listener:
- rules:
- - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
- body_listener:
- enabled: true
- versioning:
- enabled: true
- resolvers:
- media_type: # Accept header
- enabled: true
- regex: '/(v|version)=(?P<version>[0-9\.]+)/'
# format_listener:
# rules:
# - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }
+
+ routing_loader:
+ include_format: false
+ view:
+ view_response_listener: true
+ mime_types:
+ json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
+ format_listener:
+ rules:
+ - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
+ body_listener:
+ enabled: true
+ versioning:
+ enabled: true
+ resolvers:
+ media_type: # Accept header
+ enabled: true
+ regex: '/(v|version)=(?P<version>[0-9\.]+)/'
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu
- templating: { engines: ['twig'] }
+
+ serializer:
+ enabled: true
#index:
# path: /
# controller: App\Controller\DefaultController::index
+person:
+ type: rest
+ resource: App\Controller\PersonController
+++ /dev/null
-person:
- type: rest
- resource: App\Controller\PersonController