mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 06:16:42 +00:00
Serve ui directly from mount root
This commit is contained in:
parent
f321207285
commit
7c40f38c55
@ -3,10 +3,6 @@ require 'json'
|
||||
module SwaggerRails
|
||||
class SwaggerUiController < ApplicationController
|
||||
|
||||
def root
|
||||
redirect_to action: 'index'
|
||||
end
|
||||
|
||||
def index
|
||||
swagger_root = SwaggerRails.config.resolve_swagger_root(request.env)
|
||||
swagger_root.concat('/') unless swagger_root.end_with?('/')
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
SwaggerRails::Engine.routes.draw do
|
||||
root to: 'swagger_ui#root'
|
||||
get '/index.html', to: 'swagger_ui#index'
|
||||
root to: 'swagger_ui#index'
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user