{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "compilationOptions": {
      "type": "object",
      "properties": {
        "define": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "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",
            "default": "default",
            "enum": ["default", "build"]
          }
        }
      }
    },
    "script": {
      "type": ["string", "array"],
      "items": {
        "type": "string"
      },
      "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"
    }
  },
  "id": "https://json.schemastore.org/project-1.0.0-beta3.json",
  "properties": {
    "authors": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string"
      }
    },
    "bundleExclude": {
      "description": "List of files to exclude from publish output (kpm bundle).",
      "type": ["string", "array"],
      "items": {
        "type": "string"
      },
      "default": ""
    },
    "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": {
      "type": "object",
      "description": "Configurations are named groups of compilation settings. There are 2 defaults built into the runtime namely 'Debug' and 'Release'.",
      "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"
      }
    },
    "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": {
      "type": "object",
      "description": "Scripts to execute during the various stages.",
      "properties": {
        "prepack": {
          "$ref": "#/definitions/script"
        },
        "postpack": {
          "$ref": "#/definitions/script"
        },
        "prebundle": {
          "$ref": "#/definitions/script"
        },
        "postbundle": {
          "$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"
    }
  },
  "title": "JSON schema for ASP.NET project.json files",
  "type": "object"
}