{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/continuous-delivery-foundation/json-schema/continuous-delivery-foundation-step-list-response-schema.json",
  "title": "StepListResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/continuous-delivery-foundation-pipeline-overview-api-openapi.yml#/components/schemas/StepListResponse",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok"
      ]
    },
    "data": {
      "$ref": "#/$defs/StepList"
    }
  },
  "$defs": {
    "InputStep": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Input message displayed to user"
        },
        "cancel": {
          "type": "string",
          "description": "Cancel button text"
        },
        "id": {
          "type": "string",
          "description": "Input step ID"
        },
        "ok": {
          "type": "string",
          "description": "OK button text"
        },
        "parameters": {
          "type": "boolean",
          "description": "Whether the input step has parameters"
        }
      }
    },
    "PipelineState": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "paused",
        "skipped",
        "not_built",
        "finished",
        "success",
        "unstable",
        "failure",
        "unknown",
        "aborted"
      ]
    },
    "PipelineStep": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the step"
        },
        "name": {
          "type": "string",
          "description": "Display name of the step"
        },
        "state": {
          "$ref": "#/$defs/PipelineState"
        },
        "type": {
          "type": "string",
          "description": "Type of the step"
        },
        "title": {
          "type": "string",
          "description": "Full title/description of the step"
        },
        "pauseDurationMillis": {
          "type": "integer",
          "format": "int64",
          "description": "Duration in milliseconds the step was paused"
        },
        "startTimeMillis": {
          "type": "integer",
          "format": "int64",
          "description": "Step start time in milliseconds since epoch"
        },
        "totalDurationMillis": {
          "types": [
            "integer",
            null
          ],
          "format": "int64",
          "description": "Total duration in milliseconds (null if still running)"
        },
        "stageId": {
          "type": "string",
          "description": "ID of the parent stage"
        },
        "inputStep": {
          "types": [
            "object",
            null
          ],
          "$ref": "#/$defs/InputStep"
        }
      }
    },
    "StepList": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PipelineStep"
          }
        },
        "runIsComplete": {
          "type": "boolean",
          "description": "Whether the pipeline run is complete"
        }
      }
    }
  }
}