You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to have an endpoint that matches dynamically except for specific keywords.
i.e. GET resource/:id => returns the resource GET resource/new => returns a JSON schema of the resource
The issue is that when I define it this way:
class ResourceAPI
get 'resource/:id' do
# ...
end
get 'resource/new' do
# ...
end
end
I will never hit the resource/new endpoint. However, if I define it the other way around, it will work.