diff --git a/openapi/components/requestBodies/differentiation.yaml b/openapi/components/requestBodies/differentiation.yaml new file mode 100644 index 00000000..ee565bec --- /dev/null +++ b/openapi/components/requestBodies/differentiation.yaml @@ -0,0 +1,54 @@ +description: | + Differentiation profile object. +content: + application/json: + schema: + type: object + properties: + adjustment_category: + type: array + nullable: true + description: Array of adjustment category ids + items: + type: object + properties: + id: + type: integer + example: 1 + adjustment_level: + type: array + nullable: true + description: Array of adjustment level ids + items: + type: object + properties: + id: + type: integer + example: + - id: 3 + - id: 4 + overview: + type: string + nullable: true + description: Overview of the differentiation profile (if applicable) + example: null + interests_strengths: + type: string + nullable: true + description: Interests and strengths (if applicable) + example: null + needs_challenges: + type: string + nullable: true + description: Needs and challenges (if applicable) + example: null + strategies_adjustments: + type: string + nullable: true + description: Strategies and adjustments (if applicable) + example: null + goals: + type: string + nullable: true + description: Goals for the student (if applicable) + example: 'Goal 1: Improve reading comprehension.' \ No newline at end of file diff --git a/openapi/components/responses/differentiationProfile.yaml b/openapi/components/responses/differentiationProfile.yaml new file mode 100644 index 00000000..348291ec --- /dev/null +++ b/openapi/components/responses/differentiationProfile.yaml @@ -0,0 +1,5 @@ +description: A differentiation profile object. +content: + application/json: + schema: + $ref: "../schemas/differentiation.yaml" \ No newline at end of file diff --git a/openapi/components/schemas/differentiation.yaml b/openapi/components/schemas/differentiation.yaml new file mode 100644 index 00000000..1d803c56 --- /dev/null +++ b/openapi/components/schemas/differentiation.yaml @@ -0,0 +1,143 @@ +title: an Differentiation Profile +description: a Differentiation Profile object +type: object +properties: + id: + $ref: ./id.yaml + status: + type: array + readOnly: true + description: Status flags for the differentiation profile + items: + type: string + enum: + - unpopulated + - expired + - out-of-date + example: [] + student: + type: object + description: The student associated with the differentiation profile + properties: + id: + type: integer + example: 69 + fullName: + type: string + example: "Eden Reed" + givenName: + type: string + example: "Eden" + lastName: + type: string + example: "Reed" + yearLevel: + type: object + properties: + id: + type: integer + example: 4 + name: + type: string + example: "3" + _links: + type: object + properties: + profile: + type: string + example: "/search/user/69" + adjustment_category: + type: array + nullable: true + description: Array of adjustment categories (if applicable) + items: + type: object + properties: + id: + type: integer + name: + type: string + example: + - id: 1 + name: "Physical" + - id: 2 + name: "Cognitive" + adjustment_level: + type: array + nullable: true + description: Array of adjustment levels (if applicable) + items: + type: object + properties: + id: + type: integer + name: + type: string + example: + - id: 1 + name: "Extensive" + overview: + type: string + nullable: true + description: Overview of the differentiation profile (if applicable) + example: null + interests_strengths: + type: string + nullable: true + description: Interests and strengths (if applicable) + example: null + needs_challenges: + type: string + nullable: true + description: Needs and challenges (if applicable) + example: null + strategies_adjustments: + type: string + nullable: true + description: Strategies and adjustments (if applicable) + example: null + goals: + type: string + nullable: true + description: Goals for the student (if applicable) + example: 'Goal 1: Improve reading comprehension.' + _routes: + type: object + description: Related routes for the differentiation profile + properties: + linkedRecords: + type: string + nullable: true + example: "/differentiation-profiles/linkedRecords/69" + create: + type: string + nullable: true + example: "/differentiation-profiles/create/69" + edit: + type: string + nullable: true + example: "/differentiation-profiles/edit/69" + created_at: + $ref: ./dateTimeString.yaml + created_by: + type: string + description: Who created the profile + example: "Mr John Smith" + updated_at: + $ref: ./dateTimeString.yaml + updated_by: + type: string + description: Who last updated the profile + example: "Mr John Smith" + deleted_at: + title: Datetime + type: string + nullable: true + description: When the profile was deleted (if applicable). The date as a RFC3339 string. + format: date-time + example: null + +required: + - id + - status + - student \ No newline at end of file diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 5eed7cfa..506f5da3 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -107,6 +107,11 @@ tags: description: | Create and manage users. + - name: differentiation + x-displayName: Differentiation + description: | + Create and manage differentiation profiles. + servers: - url: https://{hostname}.{domain} variables: @@ -314,6 +319,9 @@ paths: /group/getData/{id}: $ref: 'paths/group@getData@{id}.yaml' + /differentiation-profiles/student/{id}: + $ref: 'paths/differentiation-profiles@student@{id}.yaml' + security: # Authorization is handled by Schoolbox itself once a user is authenticated: # therefore, no scopes are defined for any security scheme. diff --git a/openapi/paths/differentiation-profiles@student@{id}.yaml b/openapi/paths/differentiation-profiles@student@{id}.yaml new file mode 100644 index 00000000..2ee59c29 --- /dev/null +++ b/openapi/paths/differentiation-profiles@student@{id}.yaml @@ -0,0 +1,42 @@ +get: + operationId: getDifferentiationProfiles + tags: [differentiation] + summary: Get differentiation profiles + description: | + Retrieve a list of differentiation profiles. + responses: + '200': + $ref: ../components/responses/differentiationProfile.yaml + default: + $ref: ../components/responses/problem.yaml + +parameters: + - $ref: ../components/parameters/id.yaml + +post: + operationId: createDifferentiationProfiles + tags: [differentiation] + summary: Create a differentiation profile + description: | + Create a new differentiation profile. + requestBody: + $ref: ../components/requestBodies/differentiation.yaml + responses: + '201': + $ref: ../components/responses/differentiationProfile.yaml + default: + $ref: ../components/responses/problem.yaml + +put: + operationId: updateDifferentiationProfiles + tags: [differentiation] + summary: Update a differentiation profile + description: | + Update an existing differentiation profile. + requestBody: + $ref: ../components/requestBodies/differentiation.yaml + responses: + '200': + $ref: ../components/responses/differentiationProfile.yaml + default: + $ref: ../components/responses/problem.yaml \ No newline at end of file