I have the following Grape root class definition
module Api class Root < Grape::API mount Api::Version1 add_swagger_documentation :mount_path => 'docs', :base_path => "/api", :markdown => true, :hide_documentation_path => true end end
The problem is that ": base_path" should contain the full url, and I don't know where to get it. I checked the ENV variable and there is nothing close to the current domain. There is also no "request" object. Is there any way in Ruby, I can just get the current domain, i.e. HTTP_HOST variable?
source share