Skip to content

Commit

Permalink
Merge pull request #154 from tomcdonnell/hotfix-master/SA-16068
Browse files Browse the repository at this point in the history
Set some fields as required when creating events [SA-16068] master
  • Loading branch information
armatronic authored Sep 22, 2024
2 parents aaf5c70 + f680c3d commit 6ebb7cc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 16 deletions.
12 changes: 7 additions & 5 deletions openapi/components/schemas/calendar/eventCommonProps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ properties:
enum: [1, 2, 3]
attendance:
type: integer
example: 0
description: Whether attendance is enabled.
example: 2
description: Integer representing the type of attendance that is enabled. 0 means 'None', 1 means 'Invitation Only', and 2 means 'Open'.
enum: [0, 1, 2]
maxAttendees:
type: integer
nullable: true
example: 5
description: The maximum number of guests who may attend this event.
description: The maximum number of guests who may attend this event. Null means no maximum.
showAttendees:
type: integer
example: 1
type: boolean
example: false
description: Whether the list of attendees will show visible to guests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
required:
- allDay
- title
- startDate
- endDate
- publishDate
- type
- level
properties:
user:
type: object
description:
An object stub for specifying a user. This specifies the owner of the event.
When an event is created, if this is not supplied the logged-in user will
become the owner. Note the owner may not be changed after event creation.
properties:
id:
$ref: ../../schemas/id.yaml
allOf:
- type: object
- $ref: eventRequestFieldsForModify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ allOf:
- type: object
description: This is the preferred request schema.
properties:
user:
type: object
description: An object stub for specifying a user.
properties:
id:
$ref: ../../schemas/id.yaml
author:
type: object
description: An object stub for specifying an author.
description:
An object stub for specifying an author.
When an event is created, if this is not supplied the logged-in user will
become the author.
properties:
id:
$ref: ../../schemas/id.yaml
Expand All @@ -37,7 +34,7 @@ allOf:
$ref: ../../schemas/id.yaml
campuses:
type: array
description: Array of campus object stubs.
description: Array of campus object stubs. Required when creating campus-level events.
example: [{"id":123}, {"id":456}]
items:
type: object
Expand All @@ -46,7 +43,9 @@ allOf:
$ref: ../../schemas/id.yaml
folders:
type: array
description: Array of folder object stubs.
description:
Array of folder object stubs. These specify the groups that should see the event (for
group-level events). Required when creating group-level events.
example: [{"id":123}, {"id":456}]
items:
type: object
Expand Down
2 changes: 1 addition & 1 deletion openapi/paths/calendar@[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ post:
content:
application/json:
schema:
$ref: ../components/schemas/calendar/eventRequestFields.yaml
$ref: ../components/schemas/calendar/eventRequestFieldsForCreate.yaml
responses:
'200':
description: |
Expand Down
2 changes: 1 addition & 1 deletion openapi/paths/calendar@event@{id}@modify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ post:
content:
application/json:
schema:
$ref: ../components/schemas/calendar/eventRequestFields.yaml
$ref: ../components/schemas/calendar/eventRequestFieldsForModify.yaml
responses:
'200':
description: |
Expand Down

0 comments on commit 6ebb7cc

Please sign in to comment.