{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://parentsvaccineguide.org/schemas/vaers_lot_manifest.schema.json",
  "title": "VAERS Lot Pipeline Manifest",
  "description": "Provenance and quality gates from vaers_lot_pipeline.py.",
  "type": "object",
  "required": ["pipeline", "version", "generatedAt", "source", "qualityGates"],
  "properties": {
    "pipeline": { "type": "string", "const": "vaers_lot_pipeline.py" },
    "version": { "type": "string" },
    "generatedAt": { "type": "string" },
    "source": {
      "type": "object",
      "required": ["system", "years"],
      "properties": {
        "system": { "type": "string", "const": "VAERS" },
        "path": { "type": "string" },
        "years": { "type": "string" }
      },
      "additionalProperties": true
    },
    "qualityGates": {
      "type": "object",
      "required": ["lotCoveragePct", "yearStats"],
      "properties": {
        "lotCoveragePct": { "type": "number" },
        "yearStats": {
          "type": "array",
          "items": { "$ref": "vaers_lot_year_stat.schema.json" }
        }
      },
      "additionalProperties": true
    },
    "caveat": { "type": "string" },
    "criticalCaveats": { "type": "array", "items": { "type": "string" } }
  },
  "additionalProperties": true
}