A minimal REST API built with Spring Boot to manage employees and their working times in healthcare facilities. Supports CRUD operations, simple validation, and overlapping shift checks.
- Java 17
- Spring Boot 3.5.7
- Gradle
- H2 in-memory database
- JUnit 5, Mockito
- Lombok
./gradlew bootRunThe following example requests are provided in a format suitable for Postman and other HTTP clients.
POST /api/employees
Content-Type: application/json
{
"name": "Anna",
"role": "DOCTOR"
}GET /api/employees/1GET /api/employees?name=AnnaGET /api/employees?role=DOCTORPUT /api/employees/1
Content-Type: application/json
{
"name": "Anna Weber",
"role": "DOCTOR"
}POST /api/working-times
Content-Type: application/json
{
"employeeId": 1,
"startTime": "2025-11-16T09:00:00",
"endTime": "2025-11-16T17:00:00"
}GET /api/working-times/1GET /api/working-times/employee/1PUT /api/working-times/1
Content-Type: application/json
{
"employeeId": 1,
"startTime": "2025-11-16T10:00:00",
"endTime": "2025-11-16T18:00:00"
}
./gradlew test