diff options
author | Yun Huang <yun.huang@windriver.com> | 2018-05-30 18:15:36 +0800 |
---|---|---|
committer | Yun Huang <yun.huang@windriver.com> | 2018-05-30 18:15:36 +0800 |
commit | 889735bc51e90217ea6540ecc5d62337434cff6c (patch) | |
tree | 4605a6aea96141309edb206bfba1e17ba806ce10 /share/newton_base/swagger/views.py | |
parent | 785f119effd057e0e5e44ab2e1d1f3ec90c5ce5d (diff) |
Enable swagger UI for proxied API of capacity
Change-Id: I429c77dafd14a639ff607272ce86a37dd27f3c83
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.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/newton_base/swagger/views.py b/share/newton_base/swagger/views.py index 0e3722ec..165cf01e 100644 --- a/share/newton_base/swagger/views.py +++ b/share/newton_base/swagger/views.py @@ -96,6 +96,12 @@ class SwaggerJsonView(APIView): f.close() json_data["paths"].update(json_data_temp["paths"]) + json_file = os.path.join(os.path.dirname(__file__), 'multicloud.capacity.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) |