{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dpone.dev/schemas/schema-migration/fixture-plan.schema.json",
  "title": "dpone schema migration fixture plan",
  "type": "object",
  "required": [
    "schema_version",
    "fixture_plan_id",
    "pack_id",
    "target",
    "status",
    "mode",
    "requirements",
    "columns",
    "key_columns",
    "checks",
    "blockers",
    "warnings"
  ],
  "additionalProperties": true,
  "properties": {
    "schema_version": {"const": "dpone.schema_migration_fixture_plan.v1"},
    "fixture_plan_id": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "pack_id": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "target": {
      "type": "object",
      "required": ["sink_type", "table"],
      "additionalProperties": true,
      "properties": {
        "sink_type": {"type": "string"},
        "table": {"type": "string"}
      }
    },
    "status": {"enum": ["planned", "blocked"]},
    "mode": {"enum": ["none", "synthetic", "artifact_sample", "masked_sample"]},
    "artifact_path": {"type": ["string", "null"]},
    "requirements": {"type": "object"},
    "masking": {"type": "object"},
    "columns": {"type": "array", "items": {"type": "object"}},
    "key_columns": {"type": "array", "items": {"type": "string"}},
    "hierarchy": {"type": "object"},
    "checks": {"type": "object"},
    "blockers": {"type": "array", "items": {"type": "string"}},
    "warnings": {"type": "array", "items": {"type": "string"}}
  }
}
