{
  "$schema": "https://json-schema.org/draft-07/schema",
  "$id": "https://cocotec.io/schemas/popili/coco-package-v1.schema.json",
  "title": "Coco Imports",
  "$ref": "#/definitions/Index",
  "definitions": {
    "json_reference": {
      "type": "object",
      "properties": {
        "$ref": {
          "type": "string"
        }
      },
      "required": [
        "$ref"
      ],
      "title": "JSONReference"
    },
    "NamedReference": {
      "type": "object",
      "properties": {
        "reference": {
          "$ref": "#/definitions/json_reference"
        },
        "fully_qualified_name": {
          "type": "string"
        }
      },
      "required": [
        "fully_qualified_name"
      ],
      "title": "NamedReference"
    },
    "Index": {
      "type": "object",
      "properties": {
        "packages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Package"
          }
        }
      },
      "required": [
        "packages"
      ],
      "unevaluatedProperties": false,
      "description": "Contains information about the dependency graph of a Coco program, including details of package dependencies, as well as module-level dependencies.",
      "title": "Index"
    },
    "Package": {
      "type": "object",
      "properties": {
        "dependencies": {
          "type": "array",
          "description": "The direct dependencies (i.e. other packages) of this package.",
          "items": {
            "$ref": "#/definitions/NamedReference"
          }
        },
        "name": {
          "type": "string"
        },
        "modules": {
          "type": "array",
          "description": "All modules that are included in this package.",
          "items": {
            "$ref": "#/definitions/Module"
          }
        }
      },
      "required": [
        "dependencies",
        "name",
        "modules"
      ],
      "unevaluatedProperties": false,
      "title": "Package"
    },
    "Module": {
      "type": "object",
      "properties": {
        "qualified_name": {
          "type": "string"
        },
        "relative_file_name": {
          "description": "The file name of this package, relative to this package's Coco.toml file.",
          "type": "string"
        },
        "imports": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Import"
          }
        }
      },
      "required": [
        "qualified_name",
        "relative_file_name",
        "imports"
      ],
      "unevaluatedProperties": false,
      "title": "Module"
    },
    "Import": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/definitions/NamedReference"
        }
      ],
      "properties": {
        "is_stdlib": {
          "description": "If true, this file is part of Coco's standard library.",
          "type": "boolean"
        }
      },
      "required": [
        "is_stdlib"
      ],
      "unevaluatedProperties": false,
      "title": "Import"
    }
  }
}