{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://raw.githubusercontent.com/mattmccray/syncodemayo/master/config.schema.json",
    "type": "object",
    "required": [
        "local",
        "targets"
    ],
    "properties": {
        "local": {
            "$ref": "#/definitions/localTarget"
        },
        "targets": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/remoteTarget"
            }
        }
    },
    "additionalProperties": true,
    "definitions": {
        "localTarget": {
            "type": "object",
            "required": [
                "path"
            ],
            "properties": {
                "path": {
                    "type": "string"
                },
                "files": {
                    "type": "string",
                    "default": "**/**"
                },
                "exclude": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "default": []
                },
                "defaultTarget": {
                    "type": "string"
                },
                "deleteRemoteFiles": {
                    "type": "boolean",
                    "default": false
                }
            }
        },
        "remoteTarget": {
            "type": "object",
            "required": [
                "host",
                "path",
                "user"
            ],
            "properties": {
                "path": {
                    "type": "string"
                },
                "host": {
                    "type": "string"
                },
                "user": {
                    "type": "string"
                },
                "pass": {
                    "type": "string"
                },
                "port": {
                    "type": "number",
                    "description": "(Default = 21)",
                    "default": 21
                },
                "cache": {
                    "type": "string",
                    "description": "Name of checksum list file. (Default = '.synco-filelist')",
                    "default": ".synco-filelist"
                },
                "prompt": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "boolean"
                        }
                    ],
                    "default": true
                },
                "enabled": {
                    "type": "boolean",
                    "default": true
                },
                "type": {
                    "type": "string",
                    "description": "(reservered for future use)"
                }
            }
        }
    }
}