diff options
author | gebele <gebele@in-silico.ch> | 2018-06-11 12:46:06 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2018-06-11 12:46:06 +0200 |
commit | 3a11ba2918795821600b7113d0758415718d263a (patch) | |
tree | 2c03bdf1ed63582b8bb865c858ce225dee791a34 /lib/swagger.rb | |
parent | 409c8a5a353235c91cbf965a885dd12da699d993 (diff) |
combine gui with rest
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 |