diff options
Diffstat (limited to 'lib/swagger.rb')
-rw-r--r-- | lib/swagger.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/swagger.rb b/lib/swagger.rb new file mode 100644 index 0000000..efe1c9d --- /dev/null +++ b/lib/swagger.rb @@ -0,0 +1,6 @@ +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 |