code: def params_factory(schema: dict, add_message: bool) -> list:
      
  
      # Immediately create message as an argument
      params = []
      if add_message:
          params.append(click.Argument(["message"], required=False))
  
      for property, prpty_schema in schema.items():
          multiple = False
          choices = None
  
          if any(char in property for char in ["@"]):
              continue
          if prpty_schema.get("type") in COMPLEX_TYPES:
              continue
          if prpty_schema.get("duplicate"):
              continue
          if property == "message":
              continue
  
          elif not prpty_schema.get("oneOf"):
              click_type, description, choices = json_schema_to_click_type(prpty_schema)
          else:
              click_type, multiple, description = handle_oneof(prpty_schema["oneOf"])
              # Not all oneOf schema can be handled by click
              if not click_type:
                  continue
  
          # Convert bool values into flags
          if click_type == click.BOOL:
              param_decls = [get_flag_param_decals_from_bool(property)]
              click_type = None
          else:
              param_decls = [get_param_decals_from_name(property)]
  
          if description:
              description = description.capitalize()
  
              if multiple:
                  if not description.endswith("."):
                      description += "."
                  description += " Multiple usages of this option are allowed"
          # Construct the base command options
          option = partial(
              click.Option, param_decls=param_decls, help=description, multiple=multiple
          )
  
          if choices:
              option = option(type=choices)
          elif click_type:
              option = option(type=click_type)
          else:
              option = option()
          params.append(option)
      return params
docs: Generates list of :class:`click.Option` based on a JSON schema
  
      :param schema:  JSON schema to operate on
      :return: Lists of created :class:`click.Option` object to be added to a :class:`click.Command`