Realized with love
♥️ 💻
First, make sure to have dotnet downloaded and installed .NET SDK.
Now, clone the git repository, then navigate into it
cd School.API/
dotnet run
open *.sln in Visual Studio
We need a service that implements the API and handles the following requests, and has a Swagger UI to test the API of all requests:
- [GET] - Get the list of all students in JSON form
- [GET] - Get a list of all employees as JSON
- [GET] - Get list of students by class as JSON
- [GET] - Get list of employees by job title as JSON
- [POST] - Add a student
- [POST] - Add a employee
- [PUT] - Update a student
- [PUT] - Update an employee
- [DELETE] - Delete a student
- [DELETE] - Delete an employee
{
"id" : 0, // > 0
"document" :
{
"id" : 0, // document number depends on the type
"idType" : "string", // id, birth certificate, passport
"firstName" : "string",
"secondName" : "string",
"patronymic" : "string", // patronymic
}
"class" :
{
"id" : 0, // document number depends on the type
"name" : "string", // 1A, 2B, 3C, 4D ...
"classRoom" :
{
"id" : 0, // document number depends on the type
"name" : "string",
"number" : 0,
"floor" : 0, // floor
"build" : 0 // building
},
"students" :
[
{
"id" : 0, // > 0
"document" :
{
"id" : 0, // document number depends on the type
"idType" : "string", // id, birth certificate, passport
"firstName" : "string",
"secondName" : "string",
"patronymic" : "string", // patronymic
}
"averageRating" : 0.0
}
],
},
"averageRating" : 0.0
}{
"id" : 0, // > 0
"document" :
{
"id" : 0, // document number depends on the type
"idType" : "string", // id, birth certificate, passport
"firstName" : "string",
"secondName" : "string",
"patronymic" : "string", // patronymic
},
"jobTitle" : "string", // position: Teacher, Security Guard, Janitor, Director....
}{
"id" : 0, // document number depends on the type
"idType" : "string", // id, birth certificate, passport
"firstName" : "string",
"secondName" : "string",
"patronymic" : "string", // patronymic
}{
"id" : 0, // document number depends on the type
"name" : "string",
"number" : 0,
"floor" : 0, // floor
"build" : 0 // building
}{
"id" : 0, // document number depends on the type
"name" : "string", // 1A, 2B, 3C, 4D ...
"classRoom" :
{
"id" : 0, // document number depends on the type
"name" : "string",
"number" : 0,
"floor" : 0, // floor
"build" : 0 // building
},
"students" :
[
{
"id" : 0, // > 0
"document" :
{
"id" : 0, // document number depends on the type
"idType" : "string", // id, birth certificate, passport
"firstName" : "string",
"secondName" : "string",
"patronymic" : "string", // patronymic
}
"averageRating" : 0.0
}
],
}