{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-deployment-response-schema.json",
  "title": "DeploymentResponse",
  "description": "One canonical deployment boundary returned by capture or reads.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-releases-api-openapi.yml#/components/schemas/DeploymentResponse",
  "properties": {
    "commit_sha": {
      "description": "Lowercase abbreviated or full hexadecimal source commit identity.",
      "type": [
        "string",
        "null"
      ]
    },
    "deployment_id": {
      "description": "Caller-owned external deployment identity.",
      "type": "string"
    },
    "environment": {
      "description": "Exact deployment environment.",
      "type": "string"
    },
    "finished_at": {
      "description": "Millisecond-normalized deployment finish.",
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "description": "Stable internal UUID derived from project and external deployment identity.",
      "format": "uuid",
      "type": "string"
    },
    "project_id": {
      "description": "Owning project identifier.",
      "format": "uuid",
      "type": "string"
    },
    "recorded_at": {
      "description": "Time `LogBrew` first durably accepted this deployment identity.",
      "format": "date-time",
      "type": "string"
    },
    "release": {
      "description": "Exact application release.",
      "type": "string"
    },
    "schema_version": {
      "description": "Additive response schema version.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": "integer"
    },
    "service_name": {
      "description": "Exact logical service name.",
      "type": "string"
    },
    "started_at": {
      "description": "Millisecond-normalized deployment start.",
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/DeploymentStatus",
      "description": "Terminal deployment result."
    }
  },
  "required": [
    "schema_version",
    "id",
    "deployment_id",
    "project_id",
    "release",
    "environment",
    "service_name",
    "status",
    "started_at",
    "finished_at",
    "commit_sha",
    "recorded_at"
  ],
  "type": "object",
  "$defs": {
    "DeploymentStatus": {
      "description": "Terminal result of one completed deployment attempt.",
      "oneOf": [
        {
          "const": "succeeded",
          "description": "The deployment completed successfully.",
          "type": "string"
        },
        {
          "const": "failed",
          "description": "The deployment attempt completed unsuccessfully.",
          "type": "string"
        }
      ]
    }
  }
}