{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/omnirx-org/json-schema/omnirx-org-fact-twin-schema.json",
  "title": "FactTwin",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/omnirx-org-openapi.yml#/components/schemas/FactTwin",
  "type": "object",
  "required": [
    "page",
    "fact_id",
    "edition",
    "editionRoot",
    "license",
    "entity_type",
    "entity_key",
    "field",
    "value_sha256",
    "source_url",
    "retrieved_at",
    "method",
    "verify",
    "licence_status",
    "licence_label"
  ],
  "properties": {
    "page": {
      "type": "string",
      "pattern": "^https://omnirx\\.org/fact/[0-9a-f]{24}$"
    },
    "fact_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{24}$"
    },
    "edition": {
      "type": "string"
    },
    "editionRoot": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "entity_type": {
      "type": "string"
    },
    "entity_key": {
      "type": "string"
    },
    "field": {
      "type": "string"
    },
    "value": {
      "description": "the value as stored, parsed; null when it was not JSON"
    },
    "value_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "sha256 of the exact stored value text"
    },
    "source_url": {
      "type": "string"
    },
    "retrieved_at": {
      "type": "string"
    },
    "source_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "method": {
      "type": "string"
    },
    "verify": {
      "type": "string"
    },
    "licence_status": {
      "type": "string"
    },
    "licence_label": {
      "type": "string"
    },
    "quote": {
      "type": [
        "string",
        "null"
      ]
    },
    "quote_sha256": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[0-9a-f]{64}$",
      "description": "sha256 of the exact stored quote text; null when the fact carries no quote"
    }
  }
}