{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sparklaun-ch/json-schema/sparklaun-ch-public-facts-envelope-schema.json",
  "title": "PublicFactsEnvelope",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sparklaun-ch-openapi.yml#/components/schemas/PublicFactsEnvelope",
  "type": "object",
  "required": [
    "schema_version",
    "canonical_entity",
    "canonical_url",
    "generated_at",
    "last_verified_at",
    "status",
    "owner",
    "reviewer",
    "facts"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "canonical_entity": {
      "type": "string"
    },
    "canonical_url": {
      "type": "string",
      "format": "uri"
    },
    "generated_at": {
      "type": "string"
    },
    "last_verified_at": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "owner": {
      "type": "string"
    },
    "reviewer": {
      "type": "string"
    },
    "consumed_by": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "facts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicFact"
      }
    }
  },
  "$defs": {
    "PublicFact": {
      "type": "object",
      "required": [
        "id",
        "type",
        "claim",
        "status",
        "stale_state",
        "owner",
        "last_verified_at",
        "source"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "claim": {
          "type": "string"
        },
        "value": {
          "nullable": true
        },
        "status": {
          "type": "string"
        },
        "stale_state": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "reviewer": {
          "type": "string"
        },
        "last_verified_at": {
          "type": "string"
        },
        "consumed_by": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "source": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "retrieved_at": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}