Is it possible to give optional URL parameter in grape route.
Ie. for a an endpoint like :
get '/user/:name/:location/:id' do
end
Is there any way to hit this endpoint with or without "location" parameter in the URL.
I tried defining endpoint with bracket for optional parameter as below :
get '/user/:name/(:location)/:id' do
end
But this did not work