def distribution_to_markdown(distribution):
    """Genera texto en markdown a partir de los metadatos de una
    `distribution`.

    Args:
        distribution (dict): Diccionario con metadatos de una
        `distribution`.

    Returns:
        str: Texto que describe una `distribution`.
    """
    text_template = """
### {title}

{description}

#### Campos del recurso

{fields}
"""

    if "field" in distribution:
        fields = "- " + \
            "\n- ".join(map(field_to_markdown, distribution["field"]))
    else:
        fields = ""

    text = text_template.format(
        title=distribution["title"],
        description=distribution.get("description", ""),
        fields=fields
    )

    return text