{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/merofoundry-com/json-schema/merofoundry-com-site-release-response-schema.json",
  "title": "SiteReleaseResponse",
  "description": "One release; null provenance is unknown (releases queued before it was recorded).",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/merofoundry-com-openapi.json#/components/schemas/SiteReleaseResponse",
  "properties": {
    "attempts": {
      "title": "Attempts",
      "type": "integer"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "failure_hint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Hint"
    },
    "failure_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Reason"
    },
    "function_snapshot": {
      "items": {
        "$ref": "#/$defs/FunctionSnapshotResponse"
      },
      "title": "Function Snapshot",
      "type": "array"
    },
    "head_branch": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Head Branch"
    },
    "head_repository_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Head Repository Id"
    },
    "head_sha": {
      "title": "Head Sha",
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "notes": {
      "items": {
        "type": "string"
      },
      "title": "Notes",
      "type": "array"
    },
    "run_id": {
      "title": "Run Id",
      "type": "integer"
    },
    "run_url": {
      "title": "Run Url",
      "type": "string"
    },
    "site_version_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Site Version Id"
    },
    "state": {
      "title": "State",
      "type": "string"
    },
    "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "workflow_event": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Workflow Event"
    }
  },
  "required": [
    "id",
    "run_id",
    "head_branch",
    "workflow_event",
    "head_repository_id",
    "head_sha",
    "run_url",
    "state",
    "attempts",
    "failure_reason",
    "failure_hint",
    "site_version_id",
    "function_snapshot",
    "notes",
    "created_at",
    "updated_at"
  ],
  "type": "object",
  "$defs": {
    "FunctionSnapshotResponse": {
      "description": "One function a release carried; the source itself stays server-side until activation.",
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "sha256": {
          "title": "Sha256",
          "type": "string"
        },
        "size_bytes": {
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "name",
        "sha256",
        "size_bytes"
      ],
      "title": "FunctionSnapshotResponse",
      "type": "object"
    }
  }
}