code: def json_schema_to_click_type(schema: dict) -> tuple:
      
      choices = None
      if isinstance(schema["type"], list):
          if "string" in schema["type"]:
              schema["type"] = "string"
      click_type = SCHEMA_BASE_MAP[schema["type"]]
      description = schema.get("title")
      if schema.get("enum"):
          # todo handle multi type enums better (or at all)
          enum = [value for value in schema["enum"] if isinstance(value, str)]
          choices = click.Choice(enum)
      return click_type, description, choices
docs: A generic handler of a single property JSON schema to :class:`click.ParamType` converter
  
      :param schema: JSON schema property to operate on
      :return: Tuple of :class:`click.ParamType`, `description`` of option and optionally a :class:`click.Choice`
       if the allowed values are a closed list (JSON schema ``enum``)