summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/application.rb b/application.rb
index 32a0fb4..8535a9f 100644
--- a/application.rb
+++ b/application.rb
@@ -24,7 +24,9 @@ get "/api/api.json" do
response['Content-Type'] = "application/json"
api_file = File.join("api", "api.json")
bad_request_error "API Documentation in Swagger JSON is not implemented.", uri("/#{SERVICE}/api") unless File.exists?(api_file)
- File.read(api_file)
+ api_hash = JSON.parse(File.read(api_file))
+ api_hash["host"] = request.env['HTTP_HOST']
+ return api_hash.to_json
end