Using the grape-swagger
gem, I've setted a subdomain on Grape Swagger as such in routes.rb
constraints subdomain: /api/ do
mount Api::V1::Base => '/'
end
And here is document.rb
require 'grape-swagger'
module API
class Root < Grape::API
mount API::Cats
add_swagger_documentation
end
end
However, when I go to http://api.localhost:3000/swagger_doc
, I get a routing error
No route matches [GET] "/swagger_doc"
If I remove the constraints, I can access to http://localhost:3000/swagger_doc
.
I tried to add a base_path
parameter to add_swagger_documentation
but to no avail.
Any hint on what I might have done wrong ?