{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/helena-bio/json-schema/helena-bio-override-result-response-schema.json",
  "title": "OverrideResultResponse",
  "description": "Result of a create or revert operation.",
  "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/OverrideResultResponse",
  "properties": {
    "variant_idx": {
      "type": "integer",
      "title": "Variant Idx"
    },
    "acmg_class": {
      "type": "string",
      "title": "Acmg Class",
      "description": "Active classification after the operation. On create: new_class. On revert: the original pipeline class (what the frontend should now display)."
    },
    "acmg_class_original": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Acmg Class Original",
      "description": "Pipeline class before override. None after revert."
    },
    "override_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Override Reason"
    },
    "overridden_by": {
      "anyOf": [
        {
          "$ref": "#/$defs/UserAttribution"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "variant_idx",
    "acmg_class"
  ],
  "$defs": {
    "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."
    }
  }
}