Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schema to align with v3 spec #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
Update schema to align with v3 spec
- [x] Meta: district's district contact should become a user ID instead of a district admin object.
	- [x] Update District/properties/district_contact to `type: string` `x-validation: true`
- [x] Add `type` to resources/{id}/users/get/parameters/1
- [x] Remove `relationship`, `students`, and `type` from Contact properties
- [x] Remove AdminName definition because this is not referenced?
- [x] Remove `email` from Teacher
- [x] In user definitions, rename `id` to `legacy_id` for 
	- [x] Contact, 
	- [x] DistrictAdmin, 
	- [x] Staff, 
	- [x] Student, 
	- [x] Teacher
- [x] Change Users field per role to single role field with list of roles
- [x] Remove `contact`, `staff` from /resources/{id}/users/get/parameters/1
- [x] Change description for /users/{id}/mystudents to "Returns the student users for a teacher or contact user"
Amelie Zeng authored Dec 9, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 04ea275e85c970bf27036a4826e4be3c0bf7b80d
91 changes: 25 additions & 66 deletions v3.0.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
basePath: /v3.0
definitions:
AdminName:
properties:
first:
type: string
x-nullable: true
last:
type: string
x-nullable: true
type: object
BadRequest:
properties:
message:
type: string
type: object
Contact:
properties:
id:
legacy_id:
type: string
x-validation: true
phone:
@@ -32,18 +23,6 @@ definitions:
type: string
x-nullable: true
x-validation: true
relationship:
enum:
- Parent
- Grandparent
- Self
- Aunt/Uncle
- Sibling
- Other
- ""
type: string
x-nullable: true
x-validation: true
sis_id:
type: string
x-nullable: true
@@ -52,23 +31,6 @@ definitions:
$ref: '#/definitions/StudentRelationship'
type: array
x-validation: true
students:
items:
type: string
type: array
x-validation: true
type:
enum:
- Parent/Guardian
- Emergency
- Primary
- Secondary
- Family
- Other
- ""
type: string
x-nullable: true
x-validation: true
type: object
Course:
properties:
@@ -109,8 +71,7 @@ definitions:
District:
properties:
district_contact:
$ref: '#/definitions/DistrictAdmin'
x-nullable: true
type: string
x-validation: true
error:
type: string
@@ -168,7 +129,7 @@ definitions:
type: object
DistrictAdmin:
properties:
id:
legacy_id:
type: string
x-validation: true
title:
@@ -543,7 +504,7 @@ definitions:
x-nullable: true
ext:
type: object
id:
legacy_id:
type: string
x-validation: true
roles:
@@ -638,7 +599,7 @@ definitions:
type: string
x-nullable: true
x-validation: true
id:
legacy_id:
type: string
x-validation: true
last_modified:
@@ -720,12 +681,9 @@ definitions:
district:
type: string
x-validation: true
email:
type: string
x-nullable: true
ext:
type: object
id:
legacy_id:
type: string
x-validation: true
last_modified:
@@ -794,19 +752,13 @@ definitions:
type: object
User:
properties:
contact:
$ref: '#/definitions/Contact'
x-nullable: true
created:
format: datetime
type: string
x-validation: true
district:
type: string
x-validation: true
district_admin:
$ref: '#/definitions/DistrictAdmin'
x-nullable: true
email:
type: string
x-nullable: true
@@ -819,15 +771,24 @@ definitions:
x-validation: true
name:
$ref: '#/definitions/Name'
staff:
$ref: '#/definitions/Staff'
x-nullable: true
student:
$ref: '#/definitions/Student'
x-nullable: true
teacher:
$ref: '#/definitions/Teacher'
x-nullable: true
roles:
type: object
additionalProperties:
contact:
$ref: '#/definitions/Contact'
x-nullable: true
district_admin:
$ref: '#/definitions/DistrictAdmin'
x-nullable: true
staff:
$ref: '#/definitions/Staff'
x-nullable: true
student:
$ref: '#/definitions/Student'
x-nullable: true
teacher:
$ref: '#/definitions/Teacher'
x-nullable: true
type: object
UserResponse:
properties:
@@ -1140,8 +1101,6 @@ paths:
required: true
type: string
- enum:
- contact
- staff
- student
- teacher
in: query
@@ -1735,7 +1694,7 @@ paths:
- Users
/users/{id}/mystudents:
get:
description: Returns the student users for a teacher user
description: Returns the student users for a teacher or contact user
operationId: getStudentsForUser
parameters:
- in: path