{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://standardsdrift.com/data/schema/standards.schema.json",
 "title": "Standards Drift: the Commission's summary lists (standards.json)",
 "type": "object",
 "required": [
  "regulations"
 ],
 "properties": {
  "dataset": {
   "type": "string"
  },
  "publisher": {
   "type": "string"
  },
  "url": {
   "type": "string"
  },
  "license": {
   "type": "string"
  },
  "cite_as": {
   "type": "string"
  },
  "generated_from_capture_utc": {
   "type": "string"
  },
  "note": {
   "type": "string"
  },
  "sources": {
   "type": "object"
  },
  "regulations": {
   "type": "object",
   "description": "One key per list: machinery, red, gpsr.",
   "additionalProperties": {
    "type": "object",
    "required": [
     "standards"
    ],
    "properties": {
     "count": {
      "type": "integer"
     },
     "distinct_references": {
      "type": "integer"
     },
     "list_file": {
      "type": [
       "string",
       "null"
      ]
     },
     "list_generated": {
      "type": [
       "string",
       "null"
      ]
     },
     "source_name": {
      "type": [
       "string",
       "null"
      ]
     },
     "source_url": {
      "type": [
       "string",
       "null"
      ]
     },
     "unparsed_rows": {},
     "standards": {
      "type": "array",
      "items": {
       "$ref": "#/$defs/row"
      }
     }
    }
   }
  }
 },
 "$defs": {
  "row": {
   "type": "object",
   "required": [
    "reference",
    "labelled"
   ],
   "properties": {
    "reference": {
     "type": "string",
     "description": "The standard's reference as the Commission's list prints it, for example EN ISO 12100:2010."
    },
    "title": {
     "type": "string",
     "description": "The title as the list prints it."
    },
    "legislation": {
     "type": "string",
     "description": "The legislation the list sheet is for, as the list names it."
    },
    "sheet": {
     "type": "string",
     "description": "Sheet name in the Commission's workbook."
    },
    "eso": {
     "type": "string",
     "description": "European standardisation organisation: CEN, Cenelec or ETSI."
    },
    "type": {
     "type": "string",
     "description": "Machinery only: the standard type (A, B or C) where the list gives one."
    },
    "publication_oj_date": {
     "type": "string",
     "description": "Date the reference was published in the Official Journal, dd.mm.yyyy as printed."
    },
    "publication_oj_ref": {
     "type": "string",
     "description": "Official Journal reference of that publication."
    },
    "publication_decision": {
     "type": "string",
     "description": "Implementing decision that cited the reference, where the list names it."
    },
    "start_of_legal_effect": {
     "type": "string",
     "description": "Start of legal effect, dd.mm.yyyy as printed."
    },
    "start_source": {
     "type": "string",
     "description": "Where a workbook has no separate start column, the field the start date was taken from (publication_oj_date)."
    },
    "end_of_legal_effect": {
     "type": "string",
     "description": "End of legal effect, dd.mm.yyyy as printed. Absent when the list sets none."
    },
    "withdrawal_decision": {
     "type": "string",
     "description": "Implementing decision that set the end of legal effect."
    },
    "withdrawal_oj_date": {
     "type": "string",
     "description": "Official Journal date of the withdrawal, dd.mm.yyyy as printed."
    },
    "withdrawal_oj_ref": {
     "type": "string",
     "description": "Official Journal reference of the withdrawal."
    },
    "amendments": {
     "type": "array",
     "description": "Amendments and corrigenda cited under the same entry; the presumption covers the reference as amended."
    },
    "citations": {
     "type": "array",
     "description": "Every decision number and Official Journal reference the row names."
    },
    "dates": {
     "type": "array",
     "description": "Every date on the row, as printed."
    },
    "labelled": {
     "type": "boolean",
     "description": "true when the capture had the Commission's column headers. false means the dates are not placed under named columns and no status is asserted."
    },
    "notes": {
     "type": "array",
     "description": "Notices printed in the list for this row, such as a restriction on presumption of conformity."
    }
   }
  }
 }
}