Simplify the specific configuration to the bare minimum.
[Project_proches_de_moi-server.git] / config / config.yaml
index f7f08b19c7abcf66837c760a19368d42d6698b64..6aab19c0dd4af0367c670bf1dc146621e69b05fe 100644 (file)
@@ -5,18 +5,18 @@ framework:
         enabled: true
 
 fos_rest:
-    body_converter:
-        enabled: true
+    routing_loader:
+        include_format: false
     view:
-        formats: { json: true, xml: false, rss: false }
         view_response_listener: true
-    serializer:
-        serialize_null: true
+        mime_types:
+            json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
     format_listener:
         rules:
-            - { path: '^/', priorities: ['json'], fallback_format: 'json' }
-    param_fetcher_listener: force
-
-sensio_framework_extra:
-    view: { annotations: false }
-    request: { converters: true }
+            - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
+    versioning:
+        enabled: true
+        resolvers:
+            media_type: # Accept header
+                enabled: true
+                regex: '/(v|version)=(?P<version>[0-9\.]+)/'