{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/metricspot-com/json-schema/metricspot-com-pdf-status-schema.json",
  "title": "PdfStatus",
  "description": "Polling response for `GET /api/pdfs/{id}` with `Accept: application/json`.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/metricspot-com-openapi.yaml#/components/schemas/PdfStatus",
  "type": "object",
  "required": [
    "id",
    "audit_id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "audit_id": {
      "type": "integer"
    },
    "status": {
      "$ref": "#/$defs/PdfStatusEnum"
    },
    "error_message": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "generated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "download_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Populated only when status is `ready`. Relative URL to the download endpoint."
    }
  },
  "$defs": {
    "PdfStatusEnum": {
      "type": "string",
      "enum": [
        "pending",
        "rendering",
        "ready",
        "failed"
      ]
    }
  }
}