{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/helena-bio/json-schema/helena-bio-overrides-list-response-schema.json",
  "title": "OverridesListResponse",
  "description": "List of overridden variants.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/helena-bio-overrides-api-openapi.yml#/components/schemas/OverridesListResponse",
  "properties": {
    "overrides": {
      "items": {
        "$ref": "#/$defs/OverrideEntry"
      },
      "type": "array",
      "title": "Overrides"
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count"
    }
  },
  "type": "object",
  "required": [
    "overrides",
    "total_count"
  ],
  "$defs": {
    "OverrideEntry": {
      "properties": {
        "variant_idx": {
          "type": "integer",
          "title": "Variant Idx"
        },
        "acmg_class": {
          "type": "string",
          "title": "Acmg Class",
          "description": "Current override classification"
        },
        "acmg_class_original": {
          "type": "string",
          "title": "Acmg Class Original",
          "description": "Pipeline class at override time"
        },
        "override_reason": {
          "type": "string",
          "title": "Override Reason",
          "description": "Clinical justification"
        },
        "overridden_by": {
          "$ref": "#/$defs/UserAttribution",
          "description": "Who reclassified"
        }
      },
      "type": "object",
      "required": [
        "variant_idx",
        "acmg_class",
        "acmg_class_original",
        "override_reason",
        "overridden_by"
      ],
      "title": "OverrideEntry",
      "description": "Single overridden variant."
    },
    "UserAttribution": {
      "properties": {
        "user_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Id",
          "description": "User UUID. May be None for historical records migrated from DuckDB where original user was not tracked."
        },
        "user_name": {
          "type": "string",
          "title": "User Name",
          "description": "Display name of the user. For historical records, may be 'system:historical-migration' or 'unknown-historical'."
        },
        "timestamp": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timestamp",
          "description": "When the action occurred. None for historical records without precise timestamp."
        }
      },
      "type": "object",
      "required": [
        "user_name"
      ],
      "title": "UserAttribution",
      "description": "Identifies a user who performed an action, with optional timestamp.\n\nUsed in flag/override responses and annotation records. Both user_id\nand user_name are required — user_id for system references, user_name\nfor display. timestamp optional because some historical records\n(migrated from DuckDB) lack precise timestamps."
    }
  }
}