code: def get_route_param_names(endpoint):
      
      try:
          g = current_app.url_map.iter_rules(endpoint)
          return next(g).arguments
      except KeyError:
          return {}
docs: Returns parameter names from the route.