Hi,
I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API.
right now:
url: /api/:action
param: { module: api, action: :action }
requirements:
sf_format: (?:xml|json)
what i've thought:
url: /api/v1/:module/:action
param: { module: api1, action: :action }
requirements:
sf_format: (?:xml|json)
url: /api/v2/:module/:action
param: { module: api2, action: :action }
requirements:
sf_format: (?:xml|json)
That's easy, but the perfect solution would be to have the following kind of route
# Automatically redirects to one module or another
url: /api/v:version/:module/:action
param: { module: api:version, action: :action }
requirements:
sf_format: (?:xml|json)
any ideas on how to do it? what do you recommend us to do?
thanks!