{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/university-of-waterloo/json-schema/university-of-waterloo-important-date-schema.json",
  "title": "ImportantDate",
  "description": "An Important Date is an event at a time that has significance to the Waterloo community",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/university-of-waterloo-importantdates-api-openapi.yml#/components/schemas/ImportantDate",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique, non-persistent Api Id for this resource",
      "format": "int32"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name/Title of the Important Date"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional description of the Important Date, can contain markup"
    },
    "importantDateType": {
      "type": [
        "string",
        "null"
      ],
      "description": "The type category this Important Date belongs to"
    },
    "associatedAcademicYear": {
      "type": [
        "string",
        "null"
      ],
      "description": "The academic year this important date is associated to"
    },
    "details": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ImportantDateDetails"
      },
      "description": "Details about terms, dates, and special notes"
    },
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Keywords associated with the Important Date"
    },
    "audiences": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Audiences associated with the Important Date"
    },
    "audienceString": {
      "type": [
        "string",
        "null"
      ]
    },
    "keywordString": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ImportantDateDetails": {
      "type": "object",
      "properties": {
        "importantDateId": {
          "type": "integer",
          "description": "Id link to associated Important Date, internal",
          "format": "int32"
        },
        "termId": {
          "type": "integer",
          "description": "Id to the associated Term",
          "format": "int32"
        },
        "termName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the associated Term when the Important Date takes place"
        },
        "startDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Start or event date for the Important Date",
          "format": "date-time"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional end date for the Important Date",
          "format": "date-time"
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Any special notes for this occurance of the Important Date, can contain markup"
        }
      },
      "additionalProperties": false,
      "description": "Details about terms, dates, and special notes for an Important Date"
    }
  }
}