{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.mirv.top/verstak/verstak-sdk/schemas/hostname-normalization-v1.json", "title": "Verstak canonical hostname normalization v1 test vectors", "description": "Canonical hostnames are lowercase ASCII A-labels without a port or trailing DNS dot. Bare hostnames accept DNS names, IPv4, bracketed IPv6, localhost, and internal single-label names. URL inputs accept only HTTP(S). Invalid or excessively long input normalizes to an empty string.", "version": 1, "bare": [ { "input": "example.com", "output": "example.com" }, { "input": " Example.COM. ", "output": "example.com" }, { "input": "пример.рф", "output": "xn--e1afmkfd.xn--p1ai" }, { "input": "bücher.example", "output": "xn--bcher-kva.example" }, { "input": "127.0.0.1", "output": "127.0.0.1" }, { "input": "[2001:db8::1]", "output": "2001:db8::1" }, { "input": "localhost", "output": "localhost" }, { "input": "intranet", "output": "intranet" }, { "input": "", "output": "" }, { "input": "https://example.com", "output": "" }, { "input": "example.com:443", "output": "" }, { "input": "user@example.com", "output": "" }, { "input": "bad host", "output": "" }, { "input": "example..com", "output": "" }, { "input": "example.com..", "output": "" }, { "input": "127.000.000.001", "output": "" }, { "input": "[2001:db8::1]:443", "output": "" }, { "input": "a...............................................................example", "output": "" } ], "url": [ { "input": "https://пример.рф/path", "output": "xn--e1afmkfd.xn--p1ai" }, { "input": "http://Example.COM.:8080/path", "output": "example.com" }, { "input": "https://[2001:db8::1]/", "output": "2001:db8::1" }, { "input": "ftp://example.com/path", "output": "" }, { "input": "not a URL", "output": "" } ] }