summaryrefslogtreecommitdiffstats
path: root/share/newton_base/swagger/views.py
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-05-29 23:10:53 +0800
committerYun Huang <yun.huang@windriver.com>2018-05-29 23:10:53 +0800
commit785f119effd057e0e5e44ab2e1d1f3ec90c5ce5d (patch)
tree86059c6690d6cb1dea7e90436171309a80c94f1b /share/newton_base/swagger/views.py
parent5b67d58f7d59eaf81f15c21eef12a46c9d7e7688 (diff)
Enable swagger UI for proxied API
Change-Id: I46b561f5547d2c11cfd45bfc0ad0f06ace53c5d5 Issue-ID: MULTICLOUD-240 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'share/newton_base/swagger/views.py')
-rw-r--r--share/newton_base/swagger/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/newton_base/swagger/views.py b/share/newton_base/swagger/views.py
index 839abea2..0e3722ec 100644
--- a/share/newton_base/swagger/views.py
+++ b/share/newton_base/swagger/views.py
@@ -90,6 +90,12 @@ class SwaggerJsonView(APIView):
f.close()
json_data["paths"].update(json_data_temp["paths"])
+ json_file = os.path.join(os.path.dirname(__file__), 'multicloud.services.swagger.json')
+ f = open(json_file)
+ json_data_temp = json.JSONDecoder().decode(f.read())
+ f.close()
+ json_data["paths"].update(json_data_temp["paths"])
+
json_data["basePath"] = "/api/multicloud-newton/v0/"
json_data["info"]["title"] = "Service NBI of MultiCloud plugin for OpenStack Newton"
return Response(json_data)