willdurand / BazingaHateoasBundle

Integration of the Hateoas library into Symfony.
MIT License
294 stars 59 forks source link

How to configure Metadata directories #52

Closed ohaag closed 8 years ago

ohaag commented 8 years ago

Question: In the library's documentation, there is a point Configuring Metadata Locations. However, I don't understand how to apply that with the bundle: nowhere is mentioned how we have to use the HateoasBuilder in the bundle.

I think by code inspection that, it could be managed with the Metadata/Driver/DriverChain of jms/serializer but I don't understand how.

For example, I want to do the same thing with HateoasBundle than I do here with JMSSerializerBundle:

jms_serializer:
    metadata:
        directories:
            DoctrinePHPCR:
                namespace_prefix: "Doctrine\\ODM\\PHPCR"
                path: "@AppBundle/Resources/config/serializer/DoctrinePHPCR"
ohaag commented 8 years ago

Oh I just found how to do. Maybe I missed something in the documentation but I think it should explicitly be mentioned either in (JMS) Serializer Specific and/or Configuring Metadata Locations that we can directly add Hateoas configuration in the same files than JMS.