{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://www.alexanarch.org/datasets/deletion-conformance-fixture/deletion-fixture.schema.json",
 "title": "Deletion Semantics Conformance Fixture",
 "type": "object",
 "required": ["name", "version", "date", "license", "total_cases", "classes", "cases"],
 "properties": {
  "name": {"type": "string"},
  "version": {"type": "string"},
  "date": {"type": "string"},
  "license": {"type": "string"},
  "total_cases": {"type": "integer"},
  "classes": {"type": "object", "additionalProperties": {"type": "integer"}},
  "cases": {"type": "array", "items": {"$ref": "#/$defs/case"}}
 },
 "$defs": {
  "case": {
   "type": "object",
   "required": ["case_class", "identifier", "identifier_kind", "axes", "axis_subject", "expected"],
   "properties": {
    "case_class": {"type": "string"},
    "identifier": {"type": "string"},
    "identifier_kind": {"enum": ["doi", "doi_shaped_string", "archive_record", "declared_path", "state_change_claim"]},
    "axis_subject": {
     "type": "object", "required": ["kind", "identifier"],
     "properties": {"kind": {"enum": ["concept", "claim", "identifier_target", "content_payload", "tombstone_record", "registry_assertion", "registry_update", "archive_record"]},
                    "identifier": {"type": "string"}}
    },
    "axes": {
     "type": "object",
     "properties": {
      "presence": {"enum": ["removed", "never_landed"]},
      "validity": {"enum": ["unassessed", "holds", "does_not_hold"]},
      "edges": {"type": "object"},
      "note": {"type": "string"}
     },
     "additionalProperties": false
    },
    "lifecycle": {"enum": ["withdrawn"]},
    "reason": {
     "type": "object", "required": ["actor", "reason"],
     "properties": {"actor": {"enum": ["host", "producer", "unknown"]},
                    "reason": {"enum": ["not_disclosed", "unknown", "producer_bug", "ownership_correction"]},
                    "note": {"type": "string"}}
    },
    "expected": {"type": "object"},
    "recorded": {"type": "object"},
    "removal_fact_retained": {"type": "boolean"},
    "content_destroyed": {"type": "boolean"}
   }
  }
 }
}
