{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "stage-list-v1.json",
  "type": "object",
  "properties": {
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StageEntry"
      },
      "description": "A list of [stages](https://blue-build.org/reference/stages/) that are executed before the build of the final image.\nThis is useful for compiling programs from source without polluting the final bootable image."
    }
  },
  "required": [
    "stages"
  ],
  "$defs": {
    "StageEntry": {
      "anyOf": [
        {
          "$ref": "stage-v1.json"
        },
        {
          "$ref": "import-v1.json"
        }
      ]
    }
  }
}