{
  "type": "object",
  "properties": {
    "schema": {
      "const": "phishdestroy.reading-edition.v2"
    },
    "schema_url": {
      "type": "string",
      "format": "uri"
    },
    "object_type": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "language": {
      "const": "en"
    },
    "title": {
      "type": "string"
    },
    "author": {
      "type": "string"
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "source_file": {
      "type": "string"
    },
    "source_html_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "exported_at": {
      "type": "string",
      "format": "date-time"
    },
    "edition_date": {
      "type": "string",
      "format": "date"
    },
    "scope": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "omissions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url",
              "label"
            ],
            "additionalProperties": false
          }
        },
        "evidence_status": {
          "type": "string"
        }
      },
      "required": [
        "text",
        "omissions",
        "evidence_status"
      ],
      "additionalProperties": false
    },
    "pdf": {
      "type": "object",
      "properties": {
        "filename": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "bytes": {
          "type": "integer",
          "minimum": 1
        },
        "pages": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "filename",
        "url",
        "sha256",
        "bytes",
        "pages"
      ],
      "additionalProperties": false
    },
    "integrity": {
      "type": "object",
      "properties": {
        "signed_object": {
          "type": "string"
        },
        "signature_url": {
          "type": "string",
          "format": "uri"
        },
        "checksum_url": {
          "type": "string",
          "format": "uri"
        },
        "format": {
          "type": "string"
        },
        "signing_key_fingerprint": {
          "type": "string",
          "pattern": "^[A-F0-9]{40}$"
        },
        "public_key": {
          "type": "string",
          "format": "uri"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "signed_object",
        "signature_url",
        "checksum_url",
        "format",
        "signing_key_fingerprint",
        "public_key",
        "scope"
      ],
      "additionalProperties": false
    },
    "license": {
      "type": "object",
      "properties": {
        "identifier": {
          "const": "CC0-1.0"
        },
        "application": {
          "type": "string"
        },
        "rights_statement_url": {
          "type": "string",
          "format": "uri"
        },
        "rights_statement_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "identifier",
        "application",
        "rights_statement_url",
        "rights_statement_sha256"
      ],
      "additionalProperties": false
    },
    "content": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "headings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "level": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "text": {
                "type": "string"
              },
              "anchor": {
                "type": "string"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "level",
              "text",
              "anchor",
              "source_url"
            ],
            "additionalProperties": false
          }
        },
        "links": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "label",
              "url"
            ],
            "additionalProperties": false
          }
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "caption": {
                "type": "string"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "caption",
              "rows"
            ],
            "additionalProperties": false
          }
        },
        "cited_source_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      },
      "required": [
        "text",
        "headings",
        "links",
        "tables",
        "cited_source_ids"
      ],
      "additionalProperties": false
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "bytes": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "url",
          "sha256",
          "bytes"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "schema",
    "schema_url",
    "object_type",
    "id",
    "language",
    "title",
    "author",
    "source_url",
    "source_file",
    "source_html_sha256",
    "exported_at",
    "edition_date",
    "scope",
    "pdf",
    "integrity",
    "license",
    "content",
    "resources"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://phishdestroy.io/steam_dossier/exports/reading-2026-10-18/article.schema.json",
  "title": "PhishDestroy dated article reading edition, version 2",
  "description": "Signed article text and structured source references with the exact PDF digest. This is not a source-report authenticity certification."
}
