Event
Single dates, date ranges, and custom events.
Union of all event types.
{ "name": "Application closes", "eventType": "singleDate", "date": "2024-12-31", "time": "17:00:00", "description": "Applications stop being accepted."}$schema: https://json-schema.org/draft/2020-12/schema$id: Event.yamlanyOf: - $ref: SingleDateEvent.yaml description: A single date event. - $ref: DateRangeEvent.yaml description: A date range event. - $ref: OtherEvent.yaml description: Other event type.description: Union of all event types./** Union of all event types. */@Versioning.added(Versions.v0_1)union Event { /** A single date event. */ singleDate: SingleDateEvent,
/** A date range event. */ dateRange: DateRangeEvent,
/** Other event type. */ other: OtherEvent,}EventType
Section titled “EventType”Type of event (e.g., a single date, a date range, or a custom event).
| Value | Description |
|---|---|
singleDate | A single date (and possible time). |
dateRange | A period of time with a start and end date. |
other | Other event type (e.g., a recurring event). |
"singleDate"$schema: https://json-schema.org/draft/2020-12/schema$id: EventType.yamltype: stringenum: - singleDate - dateRange - otherdescription: |- Type of event (e.g., a single date, a date range, or a custom event).
- `singleDate`: A single date (and possible time). - `dateRange`: A period of time with a start and end date. - `other`: Other event type (e.g., a recurring event)./** Type of event (e.g., a single date, a date range, or a custom event). * * - `singleDate`: A single date (and possible time). * - `dateRange`: A period of time with a start and end date. * - `other`: Other event type (e.g., a recurring event). */@Versioning.added(Versions.v0_1)enum EventType { /** A single date with no time. */ singleDate,
/** A range of dates with no time. */ dateRange,
/** Other event type. */ other,}EventBase
Section titled “EventBase”Base model for all events.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name of the event. |
eventType | EventType | Yes | Type of event. |
description | string | No | Description of what this event represents. |
{ "name": "string", "eventType": "singleDate", "description": "string"}$schema: https://json-schema.org/draft/2020-12/schema$id: EventBase.yamltype: objectproperties: name: type: string description: Human-readable name of the event. eventType: $ref: EventType.yaml description: Type of event. description: type: string description: Description of what this event represents.required: - name - eventTypedescription: Base model for all events./** Base model for all events. */@discriminator("eventType")@Versioning.added(Versions.v0_1)model EventBase { /** Human-readable name of the event. */ name: string;
/** Type of event. */ eventType: EventType;
/** Description of what this event represents. */ description?: string;}SingleDateEvent
Section titled “SingleDateEvent”An event that has a date (and possible time) associated with it.
| Property | Type | Required | Description |
|---|---|---|---|
eventType | EventType | Yes | Type of event. |
date | isoDate | Yes | Date of the event in ISO 8601 format: YYYY-MM-DD. |
time | isoTime | No | Time of the event in ISO 8601 format: HH:MM:SS. |
name | string | Yes | Human-readable name of the event. |
description | string | No | Description of what this event represents. |
{ "name": "Application closes", "eventType": "singleDate", "date": "2024-12-31", "time": "17:00:00", "description": "Applications stop being accepted."}$schema: https://json-schema.org/draft/2020-12/schema$id: SingleDateEvent.yamltype: objectproperties: eventType: $ref: EventType.yaml description: Type of event. date: $ref: isoDate.yaml description: 'Date of the event in ISO 8601 format: YYYY-MM-DD.' time: $ref: isoTime.yaml description: 'Time of the event in ISO 8601 format: HH:MM:SS.' name: type: string description: Human-readable name of the event. description: type: string description: Description of what this event represents.required: - eventType - date - nameexamples: - name: Application closes eventType: singleDate date: '2024-12-31' time: '17:00:00' description: Applications stop being accepted. - name: Application opens eventType: singleDate date: '2024-01-15' description: Applications begin being accepted.description: An event that has a date (and possible time) associated with it./** An event that has a date (and possible time) associated with it. */@example(Examples.Event.applicationOpens, #{ title: "Application opens" })@example(Examples.Event.applicationCloses, #{ title: "Application closes" })@Versioning.added(Versions.v0_1)model SingleDateEvent extends EventBase { /** Type of event. */ eventType: EventType.singleDate;
/** Date of the event in ISO 8601 format: YYYY-MM-DD. */ date: isoDate;
/** Time of the event in ISO 8601 format: HH:MM:SS. */ time?: isoTime;}DateRangeEvent
Section titled “DateRangeEvent”An event that has a start and end date (and possible time) associated with it.
| Property | Type | Required | Description |
|---|---|---|---|
eventType | EventType | Yes | Type of event. |
startDate | isoDate | Yes | Start date of the event in ISO 8601 format: YYYY-MM-DD. |
startTime | isoTime | No | Start time of the event in ISO 8601 format: HH:MM:SS. |
endDate | isoDate | Yes | End date of the event in ISO 8601 format: YYYY-MM-DD. |
endTime | isoTime | No | End time of the event in ISO 8601 format: HH:MM:SS. |
name | string | Yes | Human-readable name of the event. |
description | string | No | Description of what this event represents. |
{ "name": "Enrollment period", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-01-31", "endTime": "17:00:00", "description": "Open enrollment window."}$schema: https://json-schema.org/draft/2020-12/schema$id: DateRangeEvent.yamltype: objectproperties: eventType: $ref: EventType.yaml description: Type of event. startDate: $ref: isoDate.yaml description: 'Start date of the event in ISO 8601 format: YYYY-MM-DD.' startTime: $ref: isoTime.yaml description: 'Start time of the event in ISO 8601 format: HH:MM:SS.' endDate: $ref: isoDate.yaml description: 'End date of the event in ISO 8601 format: YYYY-MM-DD.' endTime: $ref: isoTime.yaml description: 'End time of the event in ISO 8601 format: HH:MM:SS.' name: type: string description: Human-readable name of the event. description: type: string description: Description of what this event represents.required: - eventType - startDate - endDate - nameexamples: - name: Enrollment period eventType: dateRange startDate: '2024-01-01' endDate: '2024-01-31' endTime: '17:00:00' description: Open enrollment window.description: An event that has a start and end date (and possible time) associated with it./** An event that has a start and end date (and possible time) associated with it. */@example(Examples.Event.enrollmentPeriod, #{ title: "Enrollment period" })@Versioning.added(Versions.v0_1)model DateRangeEvent extends EventBase { /** Type of event. */ eventType: EventType.dateRange;
/** Start date of the event in ISO 8601 format: YYYY-MM-DD. */ startDate: isoDate;
/** Start time of the event in ISO 8601 format: HH:MM:SS. */ startTime?: isoTime;
/** End date of the event in ISO 8601 format: YYYY-MM-DD. */ endDate: isoDate;
/** End time of the event in ISO 8601 format: HH:MM:SS. */ endTime?: isoTime;}OtherEvent
Section titled “OtherEvent”An event that is not a single date or date range.
| Property | Type | Required | Description |
|---|---|---|---|
eventType | EventType | Yes | Type of event. |
details | string | No | Details of the event's timeline (e.g. "Every other Tuesday"). |
name | string | Yes | Human-readable name of the event. |
description | string | No | Description of what this event represents. |
{ "name": "Info sessions", "eventType": "other", "details": "Every other Tuesday at 10:00 AM during the enrollment period.", "description": "Live info sessions for prospective applicants."}$schema: https://json-schema.org/draft/2020-12/schema$id: OtherEvent.yamltype: objectproperties: eventType: $ref: EventType.yaml description: Type of event. details: type: string description: Details of the event's timeline (e.g. "Every other Tuesday"). name: type: string description: Human-readable name of the event. description: type: string description: Description of what this event represents.required: - eventType - nameexamples: - name: Info sessions eventType: other details: Every other Tuesday at 10:00 AM during the enrollment period. description: Live info sessions for prospective applicants.description: An event that is not a single date or date range./** An event that is not a single date or date range. */@example(Examples.Event.infoSessions, #{ title: "Info sessions" })@Versioning.added(Versions.v0_1)model OtherEvent extends EventBase { /** Type of event. */ eventType: EventType.other;
/** Details of the event's timeline (e.g. "Every other Tuesday"). */ details?: string;}