{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentcreditdata-com/json-schema/agentcreditdata-com-evidence-response-schema.json",
  "title": "EvidenceResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentcreditdata-com-openapi.json#/components/schemas/EvidenceResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "subject_id",
    "snapshot_id",
    "as_of",
    "coverage",
    "evidence"
  ],
  "properties": {
    "subject_id": {
      "type": "string",
      "minLength": 1
    },
    "snapshot_id": {
      "type": "string",
      "minLength": 1
    },
    "as_of": {
      "type": "string",
      "format": "date-time"
    },
    "coverage": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Coverage"
      }
    },
    "evidence": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceObservation"
      }
    }
  },
  "$defs": {
    "Coverage": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source",
        "scope",
        "status",
        "retrieved_at",
        "event_start",
        "event_end",
        "observed_records",
        "reported_total_records",
        "lifecycle_measurable",
        "limitations",
        "evidence_refs"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1
        },
        "scope": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "COMPLETE_FOR_SCOPE",
            "PARTIAL",
            "ERROR"
          ]
        },
        "retrieved_at": {
          "type": "string",
          "format": "date-time"
        },
        "event_start": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "event_end": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_records": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "reported_total_records": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "lifecycle_measurable": {
          "type": "boolean"
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "evidence_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "EvidenceObservation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "source_url",
        "retrieved_at",
        "raw_path",
        "sha256",
        "request_metadata_path",
        "basis",
        "finality"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "source_url": {
          "type": "string",
          "minLength": 1
        },
        "retrieved_at": {
          "type": "string",
          "format": "date-time"
        },
        "raw_path": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "request_metadata_path": {
          "type": "string",
          "minLength": 1
        },
        "basis": {
          "enum": [
            "ISSUER_ASSERTION",
            "RPC_OBSERVATION",
            "INDEXER_OBSERVATION"
          ]
        },
        "finality": {
          "enum": [
            "NOT_INDEPENDENTLY_VERIFIED"
          ]
        }
      }
    }
  }
}