{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "commandObject": {
      "properties": {
        "directory": {
          "description": "The working directory of the compilation. All paths specified in the command or file fields must be either absolute or relative to this directory.",
          "type": "string"
        },
        "file": {
          "description": "The main translation unit source processed by this compilation step. This is used by tools as the key into the compilation database. There can be multiple command objects for the same file, for example if the same source file is compiled with different configurations.",
          "type": "string"
        },
        "command": {
          "description": "The compile command executed. After JSON unescaping, this must be a valid command to rerun the exact compilation step for the translation unit in the environment the build system uses. Parameters use shell quoting and shell escaping of quotes, with '\"' and '\\' being the only special characters. Shell expansion is not supported.",
          "type": "string"
        },
        "arguments": {
          "description": "The compile command executed as list of strings.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "output": {
          "description": "The name of the output created by this compilation step. This field is optional. It can be used to distinguish different processing modes of the same input file.",
          "type": "string"
        }
      },
      "anyOf": [
        {
          "required": ["directory", "file", "command"]
        },
        {
          "required": ["directory", "file", "arguments"]
        }
      ]
    }
  },
  "description": "Describes a format for specifying how to replay single compilations independently of the build system",
  "id": "https://json.schemastore.org/compile-commands.json",
  "items": {
    "$ref": "#/definitions/commandObject"
  },
  "title": "LLVM compilation database",
  "type": "array"
}