{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pergola.wiki/data/pergola-wiki-correction-record-schema-v1.9.json",
  "title": "Pergola Wiki correction report record",
  "description": "Schema for a specific, evidence-supported correction report. A submitted or locally prepared record is not a published correction until it has been verified, resolved and entered in the public correction log.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "correction_id",
    "reported_date",
    "page_url",
    "language",
    "category",
    "problem_statement",
    "supporting_evidence",
    "requested_change",
    "reporter_contact_permission",
    "status",
    "evidence_boundary"
  ],
  "properties": {
    "schema_version": {
      "const": "1.9"
    },
    "correction_id": {
      "type": "string",
      "pattern": "^pwcorr-[a-z0-9-]+$"
    },
    "reported_date": {
      "type": "string",
      "format": "date"
    },
    "page_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://pergola\\.wiki/"
    },
    "language": {
      "enum": [
        "en",
        "zh-CN",
        "both"
      ]
    },
    "category": {
      "enum": [
        "factual_error",
        "citation_or_source",
        "scope_or_safety",
        "translation",
        "accessibility_barrier",
        "broken_link",
        "other"
      ]
    },
    "problem_statement": {
      "type": "string",
      "minLength": 10
    },
    "supporting_evidence": {
      "type": "string",
      "minLength": 3
    },
    "requested_change": {
      "type": "string",
      "minLength": 3
    },
    "reporter_contact_permission": {
      "type": "boolean"
    },
    "status": {
      "const": "received_unverified"
    },
    "evidence_boundary": {
      "const": "A prepared or received report is not proof that an error exists or that a correction has been published. Pergola Wiki must verify the page, evidence, scope and resolution before changing content or the public correction log."
    }
  }
}