Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ value:
type: about:blank
title: Internal Server Error
status: 500
detail: An unexpected error occured when accessing resource with ID=1. This error has been logged.
detail: An unexpected error occurred when accessing resource with ID=1. This error has been logged.
118 changes: 118 additions & 0 deletions openapi/components/requestBodies/pastoral-partial-item.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
description: |
Pastoral record
content:
application/json:
schema:
type: object
properties:
heading:
description: Pastoral record title.
type: string
maxLength: 255
occurredOn:
description: The date on which this is occurred in the format configured in your Admin area. This also accepts RFC3339 format such as 2021-06-22T01:23:45+10:00
type: string
format: date
example: 2021-06-22T01:23:45+10:00
nullable: true
typeId:
description: The ID of a pastoral type to associate with this pastoral record.
type: integer
nullable: false
subtypeId:
description: |
The ID of a pastoral sub-type to associate to this pastoral record.\
The sub-type must already be associated with the type provided as typeId.\
This can be null, if the pastoral type does not have any sub-type.\
This cannot be null, if the pastoral type has sub-type(s).
type: integer
nullable: true
severityId:
description: |
The ID of a pastoral severity to associate with this pastoral record.\
Required only if Allow specification of severity on pastoral records config is ON.
type: integer
nullable: true
body_public:
description: |
General content of this pastoral record in raw HTML.\
The following tokens will be substituted with the students details on creation: [firstname], [preferredname], [surname], [fullname], [year], [house].
type: string
maxLength: 65535
nullable: true
body_private:
description: |
Confidential content of this pastoral record in raw HTML.\
The following tokens will be substituted with the students details on creation: [firstname], [preferredname], [surname], [fullname], [year], [house].
type: string
maxLength: 65535
nullable: true
actions[]:
description: |
An array of IDs of pastoral action.\
Available only if Enable Pastoral Actions config is ON.
type: array
nullable: true
items:
type: integer
tags:
description: |
Comma separated IDs of existing Pastoral Record Tags.\
If non numerical string is provided, it'll be silently discarded.\
To provide a name to create a new tag, use tagNames instead.
type: string
nullable: true
tagNames:
description: |
Comma separated names of Pastoral Record Tags.\
If Allow Staff to Create Pastoral Care Tags config is ON, attempts to create a new tag, if not alraeady exists.\
The max length of a tag name is 255 chars.
type: string
nullable: true
points:
description: Points of this pastoral record.
type: number
format: float
minimum: -100000
maximum: 100000
nullable: true
role:
description: |
An array of pairs of a role and its access level to this pastoral record in the format of:\
`$roleId => $accessLevel`
* `$roleId` is one of the following:
* The ID of a role of Staff Role Type with Access Pastoral Care permission
* 'role-type-parent' (requires Allow Parent Pastoral Access config enabled)
* 'role-type-student' (requires Allow Student Pastoral Access config enabled)
* `$accessLevel` is an integer representation of access level of the $roleId
* 0 - Deny
* 1 - General
* 2 - General + Confidential
type: array
nullable: true
group:
description: |
An array of pairs of a pastoral group and its access level to this pastoral record in the format of:\
`$pastoralGroupId => $accessLevel`
* `$pastoralGroupId` is the ID of a pastoral group to set access level to
* `$accessLevel` is an integer representation of access level of the $roleId
* 0 - Deny
* 1 - General
* 2 - General + Confidential
type: array
nullable: true
user:
description: |
An array of pairs of a user and its access level to this pastoral record in the format of:\
`$userId => $accessLevel`
* `$userId` is ID of a user to set access level to. The user must be one of:
* a staff with pastoral access
* a parent of the student (requires Allow Parent Pastoral Access enabled)
* `$accessLevel` is an integer representation of access level of the $roleId
* 0 - Deny
* 1 - General
* 2 - General + Confidential
type: array
nullable: true
required:
- id
2 changes: 1 addition & 1 deletion openapi/components/schemas/pastoral-item.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ items:
sequence:
description: The order in which this pastoral severity will display in a pastoral severity list.
type: integer
occuredOn:
occurredOn:
description: The date on which this is occurred as a RFC3339 string.
type: string
format: date-time
Expand Down
Loading