@app.route('/api/v1/generate_data', methods=['POST'], endpoint='v1')
@app.route('/api/v2/generate_data', methods=['POST'], endpoint='v2')
def generate_data():
    version = request.endpoint
Flask: get current route