{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eurobase-dev/json-schema/eurobase-dev-build-deploy-manifest-schema.json",
  "title": "BuildDeployManifest",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eurobase-dev-openapi.json#/components/schemas/BuildDeployManifest",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "schemaVersion",
        "deploymentId",
        "outputKind",
        "source",
        "build",
        "runtime",
        "handoff"
      ],
      "properties": {
        "schemaVersion": {
          "const": "app-deploy-manifest-paketo-v1"
        },
        "deploymentId": {
          "type": "string"
        },
        "outputKind": {
          "const": "runtime_image"
        },
        "source": {
          "type": "object",
          "required": [
            "repoFullName",
            "commitSha",
            "rootDir"
          ],
          "properties": {
            "repoFullName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Null for a folder uploaded from the CLI (ADR 0118)"
            },
            "commitSha": {
              "type": "string",
              "pattern": "^[a-f0-9]{40}$"
            },
            "rootDir": {
              "type": "string"
            },
            "framework": {
              "type": "string",
              "enum": [
                "next",
                "astro",
                "svelte-kit",
                "nuxt",
                "react-router",
                "tanstack-start",
                "vite",
                "hono",
                "nestjs",
                "fastify",
                "express",
                "django",
                "fastapi",
                "flask",
                "laravel",
                "rails",
                "node",
                "python",
                "php",
                "ruby",
                "go",
                "java",
                "dotnet",
                "static",
                "unknown"
              ]
            }
          },
          "additionalProperties": false
        },
        "build": {
          "type": "object",
          "required": [
            "engine",
            "policyVersion",
            "policyHash",
            "platform",
            "builderImage",
            "lifecycleImage",
            "runImage",
            "bootstrapImage",
            "publisherVersion",
            "publisherSha256",
            "buildpackSetHash",
            "profileHash",
            "overlayHash",
            "phaseTimingsMs"
          ],
          "properties": {
            "engine": {
              "const": "paketo-v1"
            },
            "policyVersion": {
              "type": "string"
            },
            "policyHash": {
              "type": "string"
            },
            "platform": {
              "type": "string"
            },
            "builderImage": {
              "type": "string"
            },
            "lifecycleImage": {
              "type": "string"
            },
            "runImage": {
              "type": "string"
            },
            "bootstrapImage": {
              "type": "string"
            },
            "publisherVersion": {
              "type": "string"
            },
            "publisherSha256": {
              "type": "string"
            },
            "buildpackSetHash": {
              "type": "string"
            },
            "profileHash": {
              "type": "string"
            },
            "overlayHash": {
              "type": "string"
            },
            "phaseTimingsMs": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "supplyVerificationMs",
                    "sourceAcquisitionMs",
                    "sourceBoundaryMs",
                    "isolationStartupMs",
                    "planningMs",
                    "buildkitSolveAndRuntimeAssemblyMs",
                    "egressValidationMs",
                    "workerReleaseMs",
                    "imageArchiveLoadMs",
                    "registryAuthMs",
                    "registryPushMs",
                    "digestReadbackMs",
                    "publicationOverheadMs",
                    "cleanupMs",
                    "builderOverheadMs",
                    "builderTotalMs"
                  ],
                  "properties": {
                    "supplyVerificationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sourceAcquisitionMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sourceBoundaryMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "isolationStartupMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "planningMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "buildkitSolveAndRuntimeAssemblyMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "egressValidationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "workerReleaseMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "imageArchiveLoadMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "registryAuthMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "registryPushMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "digestReadbackMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "publicationOverheadMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cleanupMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "builderOverheadMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "builderTotalMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "runtime": {
          "type": "object",
          "required": [
            "imageRef",
            "imageDigest",
            "port",
            "healthPath"
          ],
          "properties": {
            "imageRef": {
              "type": "string"
            },
            "imageDigest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            },
            "port": {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            "healthPath": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "handoff": {
          "type": "object",
          "required": [
            "dispatchAttemptId",
            "sourceSnapshotSha256"
          ],
          "properties": {
            "dispatchAttemptId": {
              "type": "string"
            },
            "sourceSnapshotSha256": {
              "type": "string",
              "pattern": "^(?:sha256:)?[a-f0-9]{64}$"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "schemaVersion",
        "deploymentId",
        "outputKind",
        "framework",
        "source",
        "static"
      ],
      "properties": {
        "schemaVersion": {
          "type": "string",
          "enum": [
            "app-deploy-manifest-v1"
          ]
        },
        "deploymentId": {
          "type": "string"
        },
        "outputKind": {
          "type": "string",
          "enum": [
            "static_artifact"
          ]
        },
        "framework": {
          "type": "string"
        },
        "source": {
          "type": "object",
          "required": [
            "repoFullName",
            "commitSha",
            "rootDir"
          ],
          "properties": {
            "repoFullName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Null for a folder uploaded from the CLI (ADR 0118)"
            },
            "commitSha": {
              "type": [
                "string",
                "null"
              ],
              "description": "Null for a folder uploaded from the CLI (ADR 0118)"
            },
            "rootDir": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "static": {
          "type": "object",
          "required": [
            "artifactType",
            "artifactRef",
            "artifactSha256",
            "publishDirectory",
            "fileCount",
            "byteCount",
            "entrypoint",
            "routingMode"
          ],
          "properties": {
            "artifactType": {
              "type": "string",
              "enum": [
                "static_archive"
              ]
            },
            "artifactRef": {
              "type": "string"
            },
            "artifactSha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "publishDirectory": {
              "type": "string"
            },
            "fileCount": {
              "type": "integer",
              "minimum": 1
            },
            "byteCount": {
              "type": "integer",
              "minimum": 1
            },
            "entrypoint": {
              "type": "string"
            },
            "routingMode": {
              "type": "string",
              "enum": [
                "static_default_document",
                "spa_fallback"
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  ]
}