code: def rule(rules, strict_slashes=False, api_func=None, *args, **kwargs):
      
      return url_rule(api_blueprint, rules, strict_slashes=strict_slashes,
                      view_func=json_api(api_func) if api_func else None,
                      *args, **kwargs)
docs: Add a API route to the 'api' blueprint.
  
      :param rules: rule string or string list
      :param strict_slashes: same to Blueprint.route, but default value is False
      :param api_func: a function that returns a JSON serializable object
                       or a Flask Response, or raises ApiException
      :param args: other args that should be passed to Blueprint.route
      :param kwargs: other kwargs that should be passed to Blueprint.route
      :return: