DevSharofiddin / LibraryProject

0 stars 0 forks source link

Get full information about student in single api #2

Open shukurkhon opened 2 years ago

shukurkhon commented 2 years ago

In student details api ( /student/{id} ) you should return student's all books and authors of those books.

Response of API should be like this:

{
  "studnet_id": 1,
  "name": "John",
  "surname": "Doe",
  "email": "johndoe@gmail.com",
  "status": "active",
  "student_books": [
    {
      "book_id": 1,
      "book_name": "The Great Gatsby",
      "book_author": {
        "author_id": 1,
        "auhtor_name": "F. Scott Fitzgerald"
      }
    },
    {
      "book_id": 2,
      "book_name": "Sherlock Holmes",
      "book_author": {
        "author_id": 4,
        "author_name": "Sir Arthur Conan Doyle"
      }
    }
  ]
}
shukurkhon commented 2 years ago

@DevSharofiddin