summaryrefslogtreecommitdiff
path: root/lib/swagger.rb
blob: 9fa14f7f8ab34be3f5f7f5e8a6702126e1df45ac (plain)
1
2
3
4
5
6
7
8
set :public_folder, File.join("/home/ist/swagger-ui/dist/")
# route to swagger API file
get "/" do
  response['Content-Type'] = "text/html"
  index_file = File.join(ENV['HOME'],"swagger-ui/dist/index.html")
  bad_request_error "API Documentation in Swagger JSON is not implemented." unless File.exists?(index_file)
  File.read(index_file)
end