{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "JSON schema for ASP.NET project.json files",
    "definitions": {
        "compilationOptions": {
            "type": "object",
            "properties": {
                "define": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "_uniqueItems": true
                    }
                },
                "warningsAsErrors": {
                    "type": "boolean",
                    "default": false
                },
                "allowUnsafe": {
                    "type": "boolean",
                    "default": false
                },
                "optimize": {
                    "type": "boolean",
                    "default": false
                },
                "languageVersion": {
                    "type": "string",
                    "enum": [
                        "csharp1",
                        "csharp2",
                        "csharp3",
                        "csharp4",
                        "csharp5",
                        "csharp6",
                        "experimental"
                    ]
                }
            }
        },
        "configType": {
            "type": "object",
            "properties": {
                "dependencies": {
                    "$ref": "#/definitions/dependencies"
                },
                "compilationOptions": {
                    "$ref": "#/definitions/compilationOptions"
                },
                "frameworkAssemblies": {
                    "$ref": "#/definitions/dependencies"
                }
            }
        },
        "dependencies": {
            "type": "object",
            "additionalProperties": {
                "type": [
                    "string",
                    "object"
                ],
                "properties": {
                    "version": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "default",
                            "build"
                        ],
                        "default": "default"
                    }
                }
            }
        },
        "script": {
            "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            }
        }
    },
    "type": "object",
    "properties": {
        "authors": {
            "type": "array",
            "items": {
                "type": "string",
                "_uniqueItems": true
            }
        },
        "code": {
            "description": "Glob pattern to specify all the code files that needs to be compiled. (data type: string or array with glob pattern(s)). Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            },
            "default": "**\\*.cs"
        },
        "commands": {
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "compilationOptions": {
            "$ref": "#/definitions/compilationOptions"
        },
        "configurations": {
            "description": "Specify separate configuration options",
            "type": "object",
            "additionalProperties": {
                "type": "object",
                "properties": {
                    "compilationOptions": {
                        "$ref": "#/definitions/compilationOptions"
                    }
                }
            }
        },
        "dependencies": {
            "$ref": "#/definitions/dependencies"
        },
        "description": {
            "description": "The description of the application",
            "type": "string"
        },
        "exclude": {
            "description": "Glob pattern to indicate all the code files to be excluded from compilation. (data type: string or array with glob pattern(s)).",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            },
            "default": [
                "bin/**/*.*",
                "obj/**/*.*"
            ]
        },
        "frameworks": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/configType"
            }
        },
        "packExclude": {
            "description": "List of files to exclude from publish output (kpm pack).",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            },
            "default": ""
        },
        "preprocess": {
            "description": "Glob pattern to indicate all the code files to be preprocessed. (data type: string with glob pattern).",
            "type": "string",
            "default": "Compiler\\Preprocess\\**\\*.cs"
        },
        "resources": {
            "description": "Glob pattern to indicate all the files that need to be compiled as resources.",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            },
            "default": "Compiler\\Resources\\**\\*.cs"
        },
        "scripts": {
            "description": "Scripts to execute during the various stages.",
            "type": "object",
            "properties": {
                "prebuild": {
                    "$ref": "#/definitions/script"
                },
                "postbuild": {
                    "$ref": "#/definitions/script"
                },
                "prepack": {
                    "$ref": "#/definitions/script"
                },
                "postpack": {
                    "$ref": "#/definitions/script"
                },
                "prerestore": {
                    "$ref": "#/definitions/script"
                },
                "postrestore": {
                    "$ref": "#/definitions/script"
                },
                "prepare": {
                    "$ref": "#/definitions/script"
                }
            }
        },
        "shared": {
            "description": "Glob pattern to specify the code files to share with dependent projects. Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]",
            "type": [
                "string",
                "array"
            ],
            "items": {
                "type": "string"
            },
            "default": "Compiler\\Shared\\**\\*.cs"
        },
        "version": {
            "description": "The version of the application. Example: 1.2.0.0",
            "type": "string"
        },
        "webroot": {
            "description": "Specifying the webroot property in the project.json file specifies the web server root (aka public folder). In visual studio, this folder will be used to root IIS. Static files should be put in here.",
            "type": "string"
        }
    }
}