CICD/app/other_api/__init__.py

17 lines
544 B
Python
Raw Normal View History

2019-08-03 18:55:38 +02:00
BASE_ROUTE = "other_api"
2019-05-18 19:47:47 +02:00
2019-08-03 18:55:38 +02:00
def register_routes(api, app, root="api"):
2019-05-18 19:47:47 +02:00
from flask import Blueprint
from flask_restplus import Api
2019-08-03 18:55:38 +02:00
bp = Blueprint("other_api", __name__)
api = Api(bp, title="Another API with separate Swagger docs", version="0.1.0")
2019-05-18 19:47:47 +02:00
from .doodad.controller import api as doodad_api
from .whatsit.controller import api as whatsit_api
2019-08-03 18:55:38 +02:00
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}")