{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trymnemo-com/json-schema/trymnemo-com-lineage-response-schema.json",
  "title": "LineageResponse",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trymnemo-com-openapi.json#/components/schemas/LineageResponse",
  "type": "object",
  "required": [
    "vector_uid",
    "chain_ok",
    "complete",
    "depth",
    "ancestors"
  ],
  "properties": {
    "vector_uid": {
      "type": "string",
      "description": "The object whose chain was read."
    },
    "chain_ok": {
      "type": "boolean",
      "description": "true (HTTP 200) when every link re-verified on this read; false (HTTP 409) when a link failed re-verification, with `error`."
    },
    "complete": {
      "type": "boolean",
      "description": "true when the walk reached the root. false when the chain is broken (`chain_ok: false`) or the read stopped at the depth limit (`truncated: true`)."
    },
    "depth": {
      "type": "integer",
      "description": "Number of ancestors returned."
    },
    "ancestors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LineageAncestor"
      },
      "description": "Parent first."
    },
    "truncated": {
      "type": "boolean",
      "description": "Present, and true, only when the read stopped at the depth limit before reaching the root; `complete` is then false. The links read up to that point are returned."
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "description": "Present only when `chain_ok` is false. `code` is machine-readable (for example `LINEAGE_INTEGRITY_VIOLATION`, a link that failed re-verification); `message` names the check that failed. Treat any `error` as a broken chain."
    }
  },
  "$defs": {
    "LineageAncestor": {
      "type": "object",
      "required": [
        "vector_uid",
        "relation"
      ],
      "properties": {
        "vector_uid": {
          "type": "string",
          "description": "The ancestor's `vector_uid`."
        },
        "relation": {
          "type": "string",
          "description": "The relation recorded for this link."
        }
      }
    }
  }
}