Skip to content

Instantly share code, notes, and snippets.

@wpottier
Created June 23, 2017 08:59
Show Gist options
  • Save wpottier/967e93fd7e20174316062edea46cd728 to your computer and use it in GitHub Desktop.
Save wpottier/967e93fd7e20174316062edea46cd728 to your computer and use it in GitHub Desktop.
fosRestBundle config
jms_serializer:
enable_short_alias: false
metadata:
auto_detection: true
handlers:
datetime:
default_format: 'c'
default_timezone: 'UTC'
fos_rest:
serializer:
serialize_null: true
view:
failed_validation: HTTP_BAD_REQUEST
empty_content: HTTP_NO_CONTENT
force_redirects:
html: true
json: false
access_denied_listener:
json: true
body_listener:
decoders:
json: fos_rest.decoder.json
param_fetcher_listener: true
format_listener:
rules:
- { path: '^/', priorities: [json], fallback_format: json}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment