SOCSSabaragamuwa / testrepo

0 stars 0 forks source link

Implement POST /degrees #12

Open SOCSSabaragamuwa opened 6 years ago

SOCSSabaragamuwa commented 6 years ago

Prerequisite You should complete issue #10, before you could start working on this one.

POST /degrees

Request schema

{
    “name”: “B.Sc. Computer Science”,
    “department_id”: “{department_id}
}

Response schemas Status 201:

{
     “self”: “http://localhost:8090/api/degrees/{degree_id}”,
     “name”: “B.Sc. Computer Science”,
     "department": {
    “self”: “http://localhost:8090/api/departments/{department_id}”,
         “name”: “{name}”
     }
}

Status 409: If a name with that degree already exists.