YACS
YACS copied to clipboard
Pre/co-requisite in API as schema instead of string
To do this actually requires the courses to span only one semester, since their pre/co-requisite may change between semesters. Unifying courses from different semesters would require all changed property bound to a start time and an end time, which I think would be a mess to manage.
Proposing such structure:
{
"prerequisite": [
{
"name": "",
"department_code": "",
"number": 1010
}
],
"corequisite": [
{
"id": 1,
"name": "",
"department_code": "",
"number": 1010
}
]
}
For co-requisite it is possible to pinpoint the course in the same semester, but not for prerequisite, so id can be added for co-requisite.
Looks good! Just a small tweak. I think the keys should be pluralized: prerequisite -> prerequisites and corequisite -> corequisites