{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://opposablemeaning.com/vote/receipt.schema.json",
 "title": "Receipts for opposablemeaning.com/vote",
 "description": "A submission: a JSON array of receipts. Rules, topics and a prompt for AI agents: https://github.com/opposablemeaning/vote/blob/main/CONTRIBUTING.md",
 "type": "array",
 "minItems": 1,
 "items": {
  "$ref": "#/$defs/receipt"
 },
 "$defs": {
  "receipt": {
   "type": "object",
   "additionalProperties": false,
   "required": [
    "beat",
    "status",
    "caption",
    "outlet",
    "date",
    "url"
   ],
   "properties": {
    "beat": {
     "description": "Topic id",
     "enum": [
      "corruption",
      "tax",
      "cruelty",
      "war",
      "genocide",
      "troops",
      "women",
      "healthcare",
      "epstein",
      "you",
      "revenge",
      "rioters",
      "bills",
      "billionaires",
      "allies",
      "dictators",
      "ukraine",
      "suppression",
      "denial",
      "theocracy",
      "science",
      "aid",
      "insider",
      "grift",
      "faith"
     ]
    },
    "status": {
     "description": "What kind of evidence it is. QUOTE: Their own words, from a recording, transcript or post. COURT RULING: A decision by a judge, jury or court. COURT ORDER: An interim court order (like the ICJ's provisional measures), not a final ruling. COURT FILING: An allegation in a court filing, such as an indictment. OFFICIAL: A government record: a vote tally, an order, an agency release. REPORTED: Reporting by a news outlet. DATA: Published statistics. ESTIMATE: A projection or model (CBO, KFF, researchers), labeled as one. PROPOSED: Proposed, not done. LAW: Enacted law.",
     "enum": [
      "QUOTE",
      "COURT RULING",
      "COURT ORDER",
      "COURT FILING",
      "OFFICIAL",
      "REPORTED",
      "DATA",
      "ESTIMATE",
      "PROPOSED",
      "LAW"
     ]
    },
    "caption": {
     "type": "string",
     "minLength": 1,
     "maxLength": 160,
     "description": "One claim in plain words, saying only what the source says. Exact quotes go in double quotation marks."
    },
    "outlet": {
     "type": "string",
     "minLength": 1,
     "maxLength": 80,
     "description": "Who published the source: the outlet or the record, e.g. Reuters, Supreme Court opinion, House roll call 123"
    },
    "date": {
     "type": "string",
     "pattern": "^\\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\\d|3[01]))?)?$",
     "description": "When the source was published: YYYY-MM-DD (YYYY-MM or YYYY only when the source gives no day)"
    },
    "url": {
     "type": "string",
     "pattern": "^https?://\\S+$",
     "description": "The original source: the outlet or primary record, not a repost, aggregator or screenshot"
    },
    "also": {
     "description": "A second source, or a list of them (use one when url is paywalled)",
     "oneOf": [
      {
       "type": "string",
       "pattern": "^https?://\\S+$"
      },
      {
       "type": "array",
       "minItems": 1,
       "items": {
        "type": "string",
        "pattern": "^https?://\\S+$"
       }
      }
     ]
    },
    "note": {
     "type": "string",
     "maxLength": 600,
     "description": "Caveats, context or the exact quote"
    },
    "win": {
     "type": "boolean",
     "description": "true only when the receipt records them being stopped: blocked in court, voted down"
    },
    "id": {
     "type": "string",
     "pattern": "^[a-z]+\\d+$",
     "description": "Leave it out. Ids are assigned when a submission is merged."
    },
    "short": {
     "type": "string",
     "maxLength": 100,
     "description": "A shorter caption for the video. Leave it out."
    }
   }
  }
 }
}
