API: configuration
This commit is contained in:
parent
5cbea9b000
commit
9caaa58296
|
@ -6,9 +6,12 @@ fos_rest:
|
||||||
serialize_null: true
|
serialize_null: true
|
||||||
param_fetcher_listener: true
|
param_fetcher_listener: true
|
||||||
body_listener: true
|
body_listener: true
|
||||||
format_listener: true
|
format_listener:
|
||||||
|
rules:
|
||||||
|
- priorities: [json, xml]
|
||||||
|
- fallback_format: json
|
||||||
view:
|
view:
|
||||||
view_response_listener: true
|
view_response_listener: 'force'
|
||||||
formats:
|
formats:
|
||||||
xml: true
|
xml: true
|
||||||
json : true
|
json : true
|
||||||
|
|
|
@ -10,6 +10,7 @@ api_book:
|
||||||
api_category:
|
api_category:
|
||||||
resource: AppBundle\Controller\Api\CategoryController
|
resource: AppBundle\Controller\Api\CategoryController
|
||||||
type: rest
|
type: rest
|
||||||
|
defaults: {_format: json}
|
||||||
prefix: api
|
prefix: api
|
||||||
|
|
||||||
fos_js_routing:
|
fos_js_routing:
|
||||||
|
|
Loading…
Reference in a new issue