API: configuration

This commit is contained in:
Simon Vieille 2016-11-23 20:11:32 +01:00
parent 5cbea9b000
commit 9caaa58296
2 changed files with 6 additions and 2 deletions

View File

@ -6,9 +6,12 @@ fos_rest:
serialize_null: true
param_fetcher_listener: true
body_listener: true
format_listener: true
format_listener:
rules:
- priorities: [json, xml]
- fallback_format: json
view:
view_response_listener: true
view_response_listener: 'force'
formats:
xml: true
json : true

View File

@ -10,6 +10,7 @@ api_book:
api_category:
resource: AppBundle\Controller\Api\CategoryController
type: rest
defaults: {_format: json}
prefix: api
fos_js_routing: