YACS icon indicating copy to clipboard operation
YACS copied to clipboard

Pre/co-requisite in API as schema instead of string

Open louy2 opened this issue 10 years ago • 1 comments

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.

louy2 avatar Dec 03 '14 09:12 louy2

Looks good! Just a small tweak. I think the keys should be pluralized: prerequisite -> prerequisites and corequisite -> corequisites

jeffh avatar Dec 03 '14 20:12 jeffh