diff options
author | gebele <gebele@in-silico.ch> | 2017-06-09 06:58:24 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-06-09 06:58:24 +0000 |
commit | d2b22c6cb5872c2e88961a0373e01c3a510fa08b (patch) | |
tree | 2a1560fb941569304292be74dff28c8157c8568b /lib/swagger.rb | |
parent | 02a48a009f1a241102ce760feb9376ae04f81f7f (diff) |
fixed for eNM brancheNM
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 |