{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://standardsdrift.com/data/schema/reference.schema.json",
 "title": "Standards Drift: one reference (/standards/<slug>/index.json)",
 "type": "object",
 "required": [
  "reference",
  "status"
 ],
 "properties": {
  "reference": {
   "type": "string",
   "description": "Reference as the list prints it."
  },
  "title": {
   "type": "string",
   "description": "Longest title among the reference's rows."
  },
  "status": {
   "enum": [
    "ceasing",
    "cited",
    "draft",
    "ended",
    "pending",
    "published",
    "restricted",
    "unlabelled"
   ],
   "description": "Headline status (see status values); with several regimes, the most open of them."
  },
  "status_label": {
   "type": "string",
   "description": "The status in words."
  },
  "cited_with": {
   "type": "array",
   "description": "Amendments and corrigenda cited under the same entry."
  },
  "first_in_oj": {
   "type": [
    "string",
    "null"
   ],
   "description": "Earliest Official Journal date on the reference's rows, YYYY-MM-DD."
  },
  "latest_end_of_legal_effect": {
   "type": [
    "string",
    "null"
   ],
   "description": "Latest end of legal effect, YYYY-MM-DD. Null when the list sets none, and null when a later row with no end is still open."
  },
  "regimes": {
   "type": "array",
   "description": "Lists the reference is on: machinery, red, gpsr."
  },
  "status_by_regime": {
   "type": "object",
   "description": "Status under each list."
  },
  "rows": {
   "type": "array",
   "description": "Every row of the Commission's lists for this reference, with the fields of standards.json."
  },
  "record_as_of": {
   "type": "string",
   "description": "Day of the build, YYYY-MM-DD."
  },
  "last_moved": {
   "type": "string",
   "description": "Last day a row for this reference changed, YYYY-MM-DD."
  },
  "movements": {
   "type": "array",
   "description": "Dated changes to the reference's rows since the first capture."
  },
  "url": {
   "type": "string",
   "description": "The reference's page on this site."
  }
 }
}