diff options
Diffstat (limited to 'lib/swagger.rb')
-rw-r--r-- | lib/swagger.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/swagger.rb b/lib/swagger.rb index 916439e..c7b84aa 100644 --- a/lib/swagger.rb +++ b/lib/swagger.rb @@ -1,8 +1,12 @@ set :public_folder, File.join("/home/ist/swagger-ui/dist/") # route to swagger API file -get "/" do +get "/?" do response['Content-Type'] = "text/html" index_file = File.join("/home/ist/swagger-ui/dist/index.html") - #bad_request_error "API Documentation in Swagger JSON is not implemented.", uri("/#{SERVICE}/api") unless File.exists?(index_file) + bad_request_error "API Documentation in Swagger JSON is not implemented.", uri("/#{SERVICE}/api") unless File.exists?(index_file) File.read(index_file) end + +get "/swagger/?" do + redirect to("/") +end |