diff --git a/client-api/pvc-api.py b/client-api/pvc-api.py index a3b8a8b2..d1a8a567 100755 --- a/client-api/pvc-api.py +++ b/client-api/pvc-api.py @@ -207,14 +207,10 @@ api.add_resource(API_Root, '/') # /doc class API_Doc(Resource): def get(self): - if config['ssl_enabled']: - scheme = 'https' - else: - scheme = 'http' swagger_data = swagger(pvc_api.app) swagger_data['info']['version'] = API_VERSION swagger_data['info']['title'] = "PVC Client and Provisioner API" - swagger_data['host'] = "{}://{}:{}".format(scheme, config['listen_address'], config['listen_port']) + swagger_data['host'] = "{}:{}".format(config['listen_address'], config['listen_port']) return swagger_data api.add_resource(API_Doc, '/doc') diff --git a/gen-api-doc.py b/gen-api-doc.py index 35b98f8e..5bd4b8c4 100755 --- a/gen-api-doc.py +++ b/gen-api-doc.py @@ -19,7 +19,7 @@ swagger_file = "docs/manuals/swagger.json" swagger_data = swagger(pvc_api.app) swagger_data['info']['version'] = "1.0" swagger_data['info']['title'] = "PVC Client and Provisioner API" -swagger_data['info']['url'] = "http://pvc.local:7570" +swagger_data['host'] = "pvc.local:7570" with open(swagger_file, 'w') as fd: fd.write(json.dumps(swagger_data, sort_keys=True, indent=4))