{ "$schema": "http://json-schema.org/draft-07/schema", "type": "array", "items": { "type": "object", "properties": { "subdomain": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string", "format": "email" }, "type": { "type": "string", "enum": ["A", "CNAME", "TXT", "MX"] } }, "required": ["subdomain", "email"], "additionalProperties": false, "if": { "anyOf": [ { "properties": { "type": { "const": "CNAME" } } }, { "not": { "required": ["type"] } } ] }, "then": { "properties": { "url": { "type": "string", "pattern": "^(https?://)?(?:[a-zA-Z0-9-]+\\.){1,}(?:[a-zA-Z0-9-]{2,})\\/?$" } }, "required": ["url"] }, "else": {} } }