{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-doc-drift-references-response-schema.json",
  "title": "DocDriftReferencesResponse",
  "description": "Which documents name one file: the reverse view, over HTTP.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-doc-drift-api-openapi.yml#/components/schemas/DocDriftReferencesResponse",
  "properties": {
    "target_path": {
      "type": "string",
      "title": "Target Path"
    },
    "references": {
      "items": {
        "$ref": "#/$defs/DocDriftReferenceResponse"
      },
      "type": "array",
      "title": "References"
    },
    "references_emitted": {
      "type": "integer",
      "title": "References Emitted"
    },
    "references_total": {
      "type": "integer",
      "title": "References Total"
    },
    "documents": {
      "type": "integer",
      "title": "Documents"
    },
    "documents_with_drift": {
      "items": {
        "$ref": "#/$defs/DocDriftDocumentDriftResponse"
      },
      "type": "array",
      "title": "Documents With Drift"
    },
    "references_basis": {
      "type": "string",
      "title": "References Basis"
    },
    "unavailable": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "not_computed",
            "index_predates_doc_drift",
            "drift_read_failed"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Unavailable"
    }
  },
  "type": "object",
  "required": [
    "target_path",
    "references",
    "references_emitted",
    "references_total",
    "documents",
    "documents_with_drift",
    "references_basis"
  ],
  "$defs": {
    "DocDriftDocumentDriftResponse": {
      "properties": {
        "document": {
          "type": "string",
          "title": "Document"
        },
        "findings": {
          "type": "integer",
          "title": "Findings"
        }
      },
      "type": "object",
      "required": [
        "document",
        "findings"
      ],
      "title": "DocDriftDocumentDriftResponse",
      "description": "A naming document that carries drift somewhere in it.\n\n``findings`` counts the whole document, not assertions about the file that\nwas asked about. A drifted reference resolves to nothing, so no row here\ncan say a document's description of that file is wrong."
    },
    "DocDriftReferenceResponse": {
      "properties": {
        "document": {
          "type": "string",
          "title": "Document"
        },
        "line": {
          "type": "integer",
          "title": "Line"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "section": {
          "type": "string",
          "title": "Section",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "document",
        "line",
        "kind"
      ],
      "title": "DocDriftReferenceResponse",
      "description": "A document that names a file the repository still has.\n\nDeliberately weaker than a finding: it does not claim the document\ndescribes the file, or that its prose is current."
    }
  }
}