{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "JSON schema for any Grunt task",
    "definitions": {
        "dynamic": {
            "type": "object",
            "properties": {
                "expand": {
                    "description": "Must be set to true to use properties other than 'src' and 'dest'",
                    "type": "boolean",
                    "default": false
                },
                "cwd": {
                    "description": "All 'src' matches are relative to (but don't include) this path",
                    "type": "string"
                },
                "dest": {
                    "description": "Destination path prefix.",
                    "type": "string"
                },
                "ext": {
                    "description": "Replace any existing extension with this value in generated 'dest' paths.",
                    "type": "string"
                },
                "extDot": {
                    "description": "Used to indicate where the period indicating the extension is located.",
                    "enum": [
                        "first",
                        "last"
                    ],
                    "default": "first"
                },
                "filter": {
                    "description": "The 'filter' property can help you target files with a greater level of detail",
                    "enum": [
                        "isFile",
                        "isDirectory",
                        "isBlockDevice",
                        "isCharacterDevice",
                        "isSymbolicLink",
                        "isFIFO",
                        "isSocket"
                    ]
                },
                "flatten": {
                    "description": "Remove all path parts from generated 'dest' paths",
                    "type": "boolean",
                    "default": false
                },
                "matchBase": {
                    "description": "If set, patterns without slashes will be matched against the basename of the path if it contains slashes. For example, 'a?b' would match the path '/xyz/123/acb', but not '/xyz/acb/123'.",
                    "type": "boolean",
                    "default": false
                },
                "nonull": {
                    "description": "If set to 'true' then the operation will include non-matching patterns. Combined with grunt's '--verbose' flag, this option can help debug file path issues.",
                    "type": "boolean",
                    "default": false
                },
                "rename": {
                    "description": "This function is called for each matched 'src' file, (after extension renaming and flattening). ",
                    "type": "string"
                },
                "src": {
                    "description": "Pattern(s) to match, relative to the 'cwd'.",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "_uniqueItems": true
                    }
                }
            },
            "required": [
                "src"
            ]
        },
        "fileFormat": {
            "properties": {
                "files": {
                    "oneOf": [
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": [
                                    "array",
                                    "string"
                                ],
                                "items": {
                                    "type": "string",
                                    "minItems": 1,
                                    "_uniqueItems": true
                                }
                            }
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/dynamic"
                            }
                        }
                    ]
                }
            }
        }
    },
    "type": "object",
    "properties": {
        "options": {
            "type": "object"
        }
    },
    "additionalProperties": {
        "anyOf": [
            {
                "$ref": "#/definitions/fileFormat"
            },
            {
                "$ref": "#/definitions/dynamic"
            }
        ]
    }
}