Skip to content

Instantly share code, notes, and snippets.

@chanakasan
Created March 13, 2014 15:22
Show Gist options
  • Save chanakasan/9530489 to your computer and use it in GitHub Desktop.
Save chanakasan/9530489 to your computer and use it in GitHub Desktop.
# config.yml
fos_rest:
format_listener:
rules:
- { path: ^/, priorities: [ json, xml, html ], fallback_format: ~, prefer_extension: false }
view:
view_response_listener: force
sensio_framework_extra:
view: { annotations: false }
router: { annotations: true }
# routing.yml
products:
type: rest
resource: Acme\StoreBundle\Controller\RestController
defaults: {_format: json}
prefix: /api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment