{
  "$defs": {
    "LineageReference": {
      "description": "A reference to the human lineage chain of a MARS entry's publisher.\n\nEvery non-root entry traces back to a human root DID through a chain of\ndelegations.",
      "properties": {
        "generation": {
          "description": "The generation distance from the root (0 = direct child).",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "humanRootDid": {
          "description": "The DID of the originating human root.",
          "pattern": "^did:oas:",
          "type": "string"
        },
        "lineageChain": {
          "description": "Ordered chain of DIDs from root to publisher.",
          "items": {
            "pattern": "^did:oas:",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "humanRootDid",
        "generation"
      ],
      "type": "object"
    }
  },
  "$id": "urn:mars:schema:v1:entry-lineage-response",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Response body for `GET /v1/entries/{did}/lineage`.",
  "properties": {
    "entryDid": {
      "description": "DID of the resolved entry.",
      "type": "string"
    },
    "lineage": {
      "anyOf": [
        {
          "$ref": "#/$defs/LineageReference"
        },
        {
          "type": "null"
        }
      ],
      "description": "Publisher lineage summary, or `null` when the entry has no lineage."
    }
  },
  "required": [
    "entryDid"
  ],
  "title": "EntryLineageResponse",
  "type": "object"
}
