def create_app():
    app = connexion.FlaskApp(__name__, specification_dir='openapi/')
    app.add_api('my_api.yaml')

    @app.app.route('/v1/plugin/<name>/<path:path>', methods=['GET', 'POST'])
    def plugin(name, path):
        if (request.method == 'GET'):
            return api.get_plugin(name, path, request.headers, kwargs=request.args.to_dict())
        elif (request.method == 'POST'):
            return api.post_plugin(name, path, request.headers, request.get_json(), kwargs=request.args.to_dict())
        else:
            raise RuntimeError(('unsupported method ' + request.method))
    CORS(app.app)
    return app
def create_app():
    app = connexion.FlaskApp(__name__, specification_dir='openapi/')
    app.add_api('my_api.yaml')

    @app.app.route('/v1/plugin/<name>/<path:path>', methods=['GET', 'POST'])
    def plugin(name, path):
        if (request.method == 'GET'):
            return api.get_plugin(name, path, request.headers, kwargs=request.args.to_dict())
        elif (request.method == 'POST'):
            return api.post_plugin(name, path, request.headers, request.get_json(), kwargs=request.args.to_dict())
        else:
            raise RuntimeError(('unsupported method ' + request.method))
    CORS(app.app)
    return app