summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole3/backend/config/packages/fos_rest.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole3/backend/config/packages/fos_rest.yaml')
-rw-r--r--admin/WebConsole3/backend/config/packages/fos_rest.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/admin/WebConsole3/backend/config/packages/fos_rest.yaml b/admin/WebConsole3/backend/config/packages/fos_rest.yaml
new file mode 100644
index 00000000..ebce663d
--- /dev/null
+++ b/admin/WebConsole3/backend/config/packages/fos_rest.yaml
@@ -0,0 +1,32 @@
+# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
+fos_rest:
+ serializer:
+ serialize_null: true
+ param_fetcher_listener: true
+ view:
+ view_response_listener: 'force'
+ formats:
+ xml: true
+ json: true
+ templating_formats:
+ html: true
+ format_listener:
+ rules:
+ - { path: ^/, priorities: [ html, json, xml ], fallback_format: ~, prefer_extension: true }
+ exception:
+ codes:
+ 'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
+ 'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
+ messages:
+ 'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
+ allowed_methods_listener: true
+ access_denied_listener:
+ json: true
+ body_listener: true
+ body_converter:
+ enabled: true
+ validate: true
+ #array_normalizer: fos_rest.normalizer.camel_keys
+ disable_csrf_role: ROLE_API
+ routing_loader:
+ default_format: json \ No newline at end of file