{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/HolidaysDTO",
  "title": "HolidaysDTO",
  "type": "object",
  "description": "Holiday list.",
  "example": {
    "name": "My Holiday List",
    "description": "My Holiday List Desc",
    "holidays": [
      {
        "name": "Holi",
        "startDate": "2022-04-16",
        "endDate": "2022-04-16",
        "frequency": "Yearly",
        "recurrence": {
          "interval": 1,
          "specificDayOfMonth": 16,
          "specificMonth": "APR",
          "endDate": "2030-12-24"
        }
      },
      {
        "name": "Good Friday",
        "startDate": "2022-05-24",
        "endDate": "2022-05-24",
        "frequency": "Yearly",
        "recurrence": {
          "interval": 1,
          "specificDayOfMonth": 24,
          "specificMonth": "MAY",
          "endDate": "2030-12-24"
        }
      }
    ],
    "id": "93912f11-6017-404b-bf14-5331890b1797",
    "organizationId": "f53c8b54-46ca-43f6-ba05-08426a46e23d",
    "createdTime": 1628231177000,
    "lastUpdatedTime": 1628231177000
  },
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 80,
      "minLength": 0,
      "pattern": "^[a-zA-Z0-9_-]+(\\s?[a-zA-Z0-9_-]+)*$"
    },
    "startDate": {
      "type": "string"
    },
    "endDate": {
      "type": "string"
    },
    "startTime": {
      "type": "string"
    },
    "endTime": {
      "type": "string"
    },
    "frequency": {
      "type": "string",
      "enum": [
        "DontRepeat",
        "Daily",
        "Weekly",
        "Monthly",
        "Yearly"
      ]
    },
    "recurrence": {
      "$ref": "#/components/schemas/RecurrenceDTO"
    },
    "overlapsWith": {
      "type": "array",
      "description": "(Optional) Used to list the overlapping holidays.",
      "example": "holidays",
      "items": {
        "type": "string",
        "description": "(Optional) Used to list the overlapping holidays.",
        "example": "\"holidays\": [\n{\n\"name\": \"Hol1\",\n\"startDate\": \"2025-09-06\",\n\"endDate\": \"2025-09-06\"\n},\n{\n\"name\": \"Hol2\",\n\"startDate\": \"2025-09-05\",\n\"endDate\": \"2025-09-05\",\n\"overlapsWith\":[\"Hol3\"]\n},\n{\n\"name\": \"Hol3\",\n\"startDate\": \"2025-09-05\",\n\"endDate\": \"2025-09-05\",\n\"overlapsWith\":[\"Hol2\"]\n}"
      }
    }
  },
  "required": [
    "name"
  ]
}