Class: InfoController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- InfoController
- Defined in:
- app/controllers/info_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#swagger ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/controllers/info_controller.rb', line 3 def swagger @version = params[:version].to_s.gsub(/[^a-zA-Z0-9]/, '') @versions = ThecoreUiCommons.swagger_api_versions uri = URI(request.url) @base_url = "#{uri.scheme}://#{uri.host}#{":#{uri.port}" if uri.port.present?}#{ENV.fetch("RAILS_RELATIVE_URL_ROOT", "")}" @swagger_json_url = "#{@base_url}/api/#{@version}/info/swagger.json" end |