{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.robertduraniv.com/schemas/riv/verification-object-v1.json",
  "title": "R/IV Verification Object v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "id",
    "subject",
    "verdict",
    "evidence_strength",
    "finding",
    "sources",
    "provenance",
    "limitations",
    "status",
    "created_at"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "subject": {
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "verdict": {
      "enum": [
        "supported",
        "partially_supported",
        "contradicted",
        "not_established",
        "unverifiable",
        "indeterminate"
      ]
    },
    "evidence_strength": {
      "enum": [
        "strong",
        "moderate",
        "weak",
        "insufficient",
        "not_applicable"
      ]
    },
    "finding": {
      "type": "string"
    },
    "supporting_evidence": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "conflicting_evidence": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "locator"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "locator": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "provenance": {
      "type": "object",
      "required": [
        "receipt_trust_level"
      ],
      "properties": {
        "receipt_trust_level": {
          "enum": [
            "L0",
            "L1",
            "L2",
            "L3"
          ]
        },
        "receipt_id": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "enum": [
        "complete",
        "partial",
        "failed",
        "superseded"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "supersedes": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}