{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ownkube-io/json-schema/ownkube-io-revision-schema.json",
  "title": "Revision",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ownkube-io-openapi.json#/components/schemas/Revision",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "deploymentId": {
      "type": "string"
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "imageSource": {
      "type": "string",
      "enum": [
        "managed"
      ],
      "description": "Set to managed when Ownkube built and stores the image; image is then null"
    },
    "tag": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "commitMessage": {
      "type": [
        "string",
        "null"
      ],
      "description": "First line of the built commit's message, for builds from a repository"
    },
    "commitAuthor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Author of the built commit, for builds from a repository"
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "promotedFromRevisionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "triggeredByUser": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "appConfig": {
      "nullable": true
    },
    "changes": {
      "type": "array",
      "items": {
        "nullable": true
      }
    },
    "failureReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ]
    },
    "queuedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "nullable": true
        }
      ]
    },
    "buildStartedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "nullable": true
        }
      ]
    },
    "deployingAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "nullable": true
        }
      ]
    },
    "liveAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "nullable": true
        }
      ]
    },
    "failedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "nullable": true
        }
      ]
    },
    "canRollback": {
      "type": "boolean",
      "description": "Whether this revision can still be rolled back to. Only the most recent builds are retained. Present on list results only."
    }
  },
  "required": [
    "id",
    "deploymentId",
    "image",
    "tag",
    "status"
  ]
}