Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
add config example for jms_serializer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gam6itko authored and core23 committed Sep 19, 2019
1 parent f269b4b commit 570d0a9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/reference/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ Here's the configuration we used, you may adapt it to your needs:
twig:
exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'
.. code-block:: yaml
# config/packages/jms_serializer.yaml
jms_serializer:
visitors:
xml_serialization:
format_output: '%kernel.debug%'
metadata:
directories:
ApplicationSonataNewsBundle:
namespace_prefix: 'Application\Sonata\NewsBundle\'
path: '@ApplicationSonataNewsBundle/Resources/config/serializer'
SonataDatagridBundle:
namespace_prefix: 'Sonata\DatagridBundle\'
path: '@SonataDatagridBundle/Resources/config/serializer'
In order to activate the API's, you'll also need to add this to your routing:

.. code-block:: yaml
Expand Down

0 comments on commit 570d0a9

Please sign in to comment.