Disable doc endpoint to avoid flask_swagger dep
This commit is contained in:
parent
88f1be8cc9
commit
9b81a02805
|
@ -33,7 +33,6 @@ from distutils.util import strtobool
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from flask_restful import Resource, Api, reqparse, abort
|
from flask_restful import Resource, Api, reqparse, abort
|
||||||
from flask_swagger import swagger
|
|
||||||
|
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
|
|
||||||
|
@ -204,24 +203,24 @@ class API_Root(Resource):
|
||||||
return { "message": "PVC API version {}".format(API_VERSION) }
|
return { "message": "PVC API version {}".format(API_VERSION) }
|
||||||
api.add_resource(API_Root, '/')
|
api.add_resource(API_Root, '/')
|
||||||
|
|
||||||
# /doc
|
# /doc - NOTE: Until flask_swagger is packaged for Debian this must be disabled
|
||||||
class API_Doc(Resource):
|
#class API_Doc(Resource):
|
||||||
def get(self):
|
# def get(self):
|
||||||
"""
|
# """
|
||||||
Provide the Swagger API documentation
|
# Provide the Swagger API documentation
|
||||||
---
|
# ---
|
||||||
tags:
|
# tags:
|
||||||
- root
|
# - root
|
||||||
responses:
|
# responses:
|
||||||
200:
|
# 200:
|
||||||
description: OK
|
# description: OK
|
||||||
"""
|
# """
|
||||||
swagger_data = swagger(pvc_api.app)
|
# swagger_data = swagger(pvc_api.app)
|
||||||
swagger_data['info']['version'] = API_VERSION
|
# swagger_data['info']['version'] = API_VERSION
|
||||||
swagger_data['info']['title'] = "PVC Client and Provisioner API"
|
# swagger_data['info']['title'] = "PVC Client and Provisioner API"
|
||||||
swagger_data['host'] = "{}:{}".format(config['listen_address'], config['listen_port'])
|
# swagger_data['host'] = "{}:{}".format(config['listen_address'], config['listen_port'])
|
||||||
return swagger_data
|
# return swagger_data
|
||||||
api.add_resource(API_Doc, '/doc')
|
#api.add_resource(API_Doc, '/doc')
|
||||||
|
|
||||||
# /login
|
# /login
|
||||||
class API_Login(Resource):
|
class API_Login(Resource):
|
||||||
|
|
Loading…
Reference in New Issue