{
  "title": "Ideatura sample set - drawing audit answer key",
  "type": "object",
  "required": ["dataset", "items"],
  "properties": {
    "dataset": {
      "type": "object",
      "required": ["name", "key_version", "page_count", "coordinate_system"],
      "properties": {
        "name": {"type": "string"},
        "key_version": {"type": "string"},
        "page_count": {"type": "integer"},
        "coordinate_system": {"type": "string", "description": "PDF points, origin top-left of page, x right, y down; values rounded to 1 pt"},
        "counts": {"type": "object", "additionalProperties": {"type": "object", "additionalProperties": {"type": "integer"}}}
      }
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["item_no", "item_type", "label", "page", "sheet", "bbox", "status"],
        "additionalProperties": false,
        "properties": {
          "item_no": {"type": "integer", "minimum": 1},
          "item_type": {"enum": ["callout", "door_tag", "keynote", "sheet_index_entry", "schedule_row"]},
          "label": {"type": "string", "description": "Text as printed on the drawing"},
          "page": {"type": "integer", "minimum": 1},
          "sheet": {"type": ["string", "null"], "description": "Sheet number from the title block"},
          "bbox": {"type": "array", "items": {"type": "integer"}, "minItems": 4, "maxItems": 4, "description": "[x0, y0, x1, y1] in PDF points"},
          "status": {"enum": ["verified", "issue"]},
          "issue_type": {"enum": [null, "Reference Missing", "Incorrect Ref. Detail", "Unused", "Missing From Schedule", "Sheet is missing", "Duplicated"]},
          "expected_target": {"type": ["string", "null"], "description": "Human-readable drawing reference, e.g. 'detail 3 on A501' or 'door 107 in door schedule'"}
        }
      }
    }
  }
}
