{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.michaeldariuseastwood.com/schemas/supplementary-works.schema.json",
  "title": "Supplementary public research works",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "registerId", "dateModified", "works"],
  "properties": {
    "schemaVersion": {"const": 1},
    "registerId": {"type": "string", "minLength": 1},
    "dateModified": {"type": "string", "format": "date"},
    "works": {
      "type": "array",
      "minItems": 1,
      "items": {"$ref": "#/$defs/work"}
    }
  },
  "$defs": {
    "work": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "type", "name", "url", "sourcePath", "inLanguage"],
      "properties": {
        "id": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
        "type": {"enum": ["Report", "CreativeWork", "Dataset", "SoftwareSourceCode"]},
        "name": {"type": "string", "minLength": 1},
        "alternateName": {"type": "string", "minLength": 1},
        "subtitle": {"type": "string", "minLength": 1},
        "url": {"type": "string", "format": "uri", "pattern": "^https://www\\.michaeldariuseastwood\\.com/"},
        "sourcePath": {"type": "string", "minLength": 1},
        "dateCreated": {"type": "string", "format": "date"},
        "dateModified": {"type": "string", "format": "date"},
        "creativeWorkStatus": {"type": "string", "minLength": 1},
        "inLanguage": {"type": "string", "minLength": 1}
      }
    }
  }
}
