SOCSSabaragamuwa / testrepo

0 stars 0 forks source link

Implement POST /faculties #8

Open SOCSSabaragamuwa opened 6 years ago

SOCSSabaragamuwa commented 6 years ago

A faculty resource should follow the following request/response schema.

POST /faculties

Request schema

{
    “name”: “Engineering”
}

Response schemas Status 201:

{
    “self”: “http://localhost:8090/api/faculties/{faculty_id}”,
    “name”: “Engineering”
}

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

{
     "status": 409,
     "message": "A faculty with name: {name} already exists.",
     "developerMessage": "Faculty creation failed because the faculty name: {name} already exists.",
}