Closed
Description
Path based versioning works for all routes whose paths are not the root path '/'
require 'grape'
require 'rack-test'
class API < Grape::API
version 'v1', using: :path
# this works fine if you change it to /hello
get '/' do
"I am version 1"
end
end
include Rack::Test::Methods
def app
API
end
get '/v1/'
# prints not found
puts "/ with path version v1: " + last_response.body
puts
get '/v1'
# also prints not found
puts "/ with path version v1: " + last_response.body
puts