Skip to content

Commit 370874a

Browse files
Update event & relevant request schemas to support recurring events (#579)
* Update event & relevant request schemas to support recurring events * Update CalendarEventRecurrence.yaml * Update UpdateCalendarEventRequest.yaml * Update CalendarEventRecurrence.yaml
1 parent 68416a2 commit 370874a

9 files changed

Lines changed: 90 additions & 5 deletions

openapi/components/requests/CreateCalendarEventRequest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ properties:
3333
$ref: ../schemas/LanguageCode.yaml
3434
maxItems: 3
3535
minItems: 0
36+
occurrenceKind:
37+
$ref: ../schemas/CalendarEventOccurrenceKind.yaml
3638
parentId:
3739
$ref: ../schemas/CalendarID.yaml
3840
platforms:
3941
type: array
4042
items:
4143
$ref: ../schemas/CalendarEventPlatform.yaml
44+
recurrence:
45+
$ref: ../schemas/CalendarEventRecurrence.yaml
4246
roleIds:
4347
type: array
4448
items:

openapi/components/requests/UpdateCalendarEventRequest.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ properties:
3636
type: array
3737
items:
3838
type: string
39+
recurrence:
40+
$ref: ../schemas/CalendarEventRecurrence.yaml
3941
roleIds:
4042
type: array
4143
items:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
title: CalendarDayOfWeek
2+
type: string
3+
description: The day of the week, used for recurring events.
4+
enum:
5+
- FR
6+
- MO
7+
- SA
8+
- SU
9+
- TH
10+
- TU
11+
- WE
12+
default: SU
13+
example: FR

openapi/components/schemas/CalendarEvent.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,15 @@ properties:
4747
items:
4848
$ref: ./LanguageCode.yaml
4949
occurrenceKind:
50-
type: string
51-
description: So far if it exists, always the string "single"
50+
$ref: ./CalendarEventOccurrenceKind.yaml
5251
ownerId:
5352
$ref: ./GroupID.yaml
5453
platforms:
5554
type: array
5655
items:
5756
$ref: ./CalendarEventPlatform.yaml
5857
recurrence:
59-
type: string
60-
description: So far unused, always "null"
61-
nullable: true
58+
$ref: ./CalendarEventRecurrence.yaml
6259
roleIds:
6360
type: array
6461
description: Group roles that may join this event
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: CalendarEventFrequency
2+
type: string
3+
description: The time unit used to specify how often a recurring event occurs.
4+
enum:
5+
- daily
6+
- monthly
7+
- weekly
8+
- yearly
9+
default: weekly
10+
example: weekly
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title: CalendarEventOccurrenceKind
2+
type: string
3+
description: How an event occurs or recurs. "single" is a standalone event, "series" is a parent specification of a recurring series, and "occurrence" is an individual event in a series.
4+
enum:
5+
- occurrence
6+
- series
7+
- single
8+
default: single
9+
example: single
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
title: CalendarEventRecurrence
2+
type: object
3+
description: Details about how a recurring event will be scheduled. If the event is to be scheduled indefinitely, this will lack an "end" property.
4+
nullable: true
5+
properties:
6+
daysOfWeek:
7+
type: array
8+
description: Which days of the week the event will be scheduled, only valid/present for "weekly" recurring events
9+
items:
10+
$ref: ./CalendarDayOfWeek.yaml
11+
end:
12+
$ref: ./CalendarEventRecurrenceEnd.yaml
13+
frequency:
14+
$ref: ./CalendarEventFrequency.yaml
15+
interval:
16+
type: integer
17+
description: How often the event will be scheduled, in units of "frequency"
18+
minimum: 1
19+
timezone:
20+
type: string
21+
description: The timezone the event will be scheduled in, in Area/Location format
22+
example: America/Chicago
23+
required:
24+
- frequency
25+
- interval
26+
- timezone
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
title: CalendarEventRecurrenceEnd
2+
type: object
3+
description: Details about how a recurring event stops being scheduled
4+
properties:
5+
count:
6+
type: integer
7+
description: Required for "afterOccurrences" - The number of times the event will be scheduled before it stops being scheduled
8+
minimum: 1
9+
date:
10+
type: string
11+
description: Required for "afterDate" - The date and time after which the event will stop being scheduled, **without timezone or offset**
12+
example: 2026-12-31T23:59:00
13+
type:
14+
$ref: ./CalendarEventRecurrenceEndType.yaml
15+
required:
16+
- type
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: CalendarEventRecurrenceEndTyoe
2+
type: string
3+
description: How a recurring event stops being scheduled
4+
enum:
5+
- afterDate
6+
- afterOccurrences
7+
default: afterDate
8+
example: afterOccurrences

0 commit comments

Comments
 (0)