Hi Lukas!

Thank you for contributing to FOSRestBundle and making thoughts to
make writing RESTful web services with Symfony2 easier!

> I am working on implementing API versioning support in FOSRestBundle via 
> Accept header:https://github.com/FriendsOfSymfony/FOSRestBundle/pull/136
>
> Note that right now I am only looking support versioning via Accept header 
> and not the ugly practice of versioning via URL's which is actually possible 
> today fairly decently already.

Great decision! I like this approach with the Accept header and the
customized mime-type to differ the versions of the API and not to
support versioning via url (this is very ugly and can break the api
interoperability easily).

> Now in order to configure the relation between the various controllers I see 
> two approaches:
>
> 1) make it possible to define multiple resources in the route which is 
> implemented inhttps://github.com/symfony/symfony/pull/2145
> 2) add an annotation/yaml/xml support for the above mentioned resources to 
> configure the relationship
>
> Personally I find 1) much much cleaner, but 2) would not require any changes 
> to Symfony which means it can work with Symfony 2.0

First, I want to understand why we need the solution with multiple
resources per route (1).

Your approach:

rest:
  resources: [foo_v1.rest.controller, foo_v2.rest.controller]
  type:      rest

… is in fact the same to:

rest_v1:
  resource: foo_v1.rest.controller
  type:     rest

rest_v2:
  resource:  foo_v2.rest.controller
  type:      rest

Please, can you explain me the reasons?

Additionally, we should not forget to keep the hypermedia (HATEOAS) in
mind (FOSRestBundle could provide ways for easy generation of links
(href, rel and media type)).

Apart from that, I'm looking forward to use the FOSRestBundle in the
production some day.

Thank you,
Fabian

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to