from typing import List


def go_schema_interface(struct: str, url: str) -> List[str]:
    """
    Generate the schemas.Schema interface for a particular schema.

    This is used for getting json-schema-based validators from Schema objects, as well as being
    used by the reflect code in defaults.go.
    """
    lines = []

    x = struct[0].lower()

    lines.append("")
    lines.append(f"func ({x} {struct}) ParsedSchema() interface{{}} {{")
    lines.append(f"\treturn schemas.Parsed{struct}()")
    lines.append("}")
    lines.append("")
    lines.append(f"func ({x} {struct}) SanityValidator() *jsonschema.Schema {{")
    lines.append(f'\treturn schemas.GetSanityValidator("{url}")')
    lines.append("}")
    lines.append("")
    lines.append(f"func ({x} {struct}) CompletenessValidator() *jsonschema.Schema {{")
    lines.append(f'\treturn schemas.GetCompletenessValidator("{url}")')
    lines.append("}")

    return lines