{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "HTML Email Template Schema",
    "description": "Defines the customization points available in an HTML body email template.",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "meta",
        "htmlContent"
    ],
    "properties": {
        "meta": {
            "type": "object",
            "title": "Email",
            "required": [
                "fromName",
                "fromAddress",
                "subject"
            ],
            "additionalProperties": false,
            "properties": {
                "fromName": {
                    "type": "string",
                    "title": "From Name",
                    "default": "My Company",
                    "propertyOrder": 1,
                    "minLength": 1,
                    "options": {
                        "validate": [
                            "handlebars"
                        ]
                    }
                },
                "fromAddress": {
                    "type": "string",
                    "title": "From Address",
                    "default": "company@example.com",
                    "propertyOrder": 2,
                    "minLength": 5,
                    "options": {
                        "validate": [
                            "handlebars"
                        ]
                    }
                },
                "subject": {
                    "type": "string",
                    "title": "Subject",
                    "propertyOrder": 3,
                    "minLength": 1,
                    "options": {
                        "validate": [
                            "handlebars"
                        ],
                        "input_height": "50px"
                    }
                }
            }
        },
        "htmlContent": {
            "type": "string",
            "title": "HTML Content",
            "description": "Raw HTML content that can use {{mergeTags}} from handlebars"
        }
    }
}