CICD/app/other_api/__init__.py
2019-05-18 13:47:47 -04:00

17 lines
544 B
Python

BASE_ROUTE = 'other_api'
def register_routes(api, app, root='api'):
from flask import Blueprint
from flask_restplus import Api
bp = Blueprint('other_api', __name__)
api = Api(bp, title='Another API with separate Swagger docs', version='0.1.0')
from .doodad.controller import api as doodad_api
from .whatsit.controller import api as whatsit_api
api.add_namespace(doodad_api, path=f'/doodad')
api.add_namespace(whatsit_api, path=f'/whatsit')
app.register_blueprint(bp, url_prefix=f'/{root}/{BASE_ROUTE}')