Minimal Java Version required: 17
- java 17
- hibernate 6
- springboot 3
- lombok 1.18
- mapstruct 1.5
- Task id is autogenerated;
- Task description has default value: "New reminder". If you create task without description then default value will be taken
- It is available to change description, dueDate and status by REST API
- CompletedWhen field of Task is set automatically when the status is changed to DONE
- CompletedWhen field of Task is deleted automatically when the status is changed to NOT_DONE
- Task status is changed to Past Due if dueDate is in the past and the status is changed to NOT_DONE
- Task status is changed to Past Due after creation if dueDate is in the past
- Task id is required in TaskDto json only for PUT method (when updating task data)
- It is available to create a new task without TaskDto json, then default parameters will be taken ("New reminder" for the description and null for the dueDate)
- Build the project using "mvn clean install" command
- Create an image with the command "docker image build -t task-manager:latest ."
- Run docker container using the command "docker run -dp 7002:7002 --name task-manager task-manager:latest"
- Now you can send requests to http://localhost:7002
- You can find the Postman collection "Task Manager.postman_collection.json" in the resources folder. It can be imported into Postman and then executed. It uses localhost:7002 as the host and all the parameters are already configured
- There are some integration tests as well. You can run them with "mvn clean install" command
-
Show all not competed tasks:
GET /api/v1/task/status/not_done
-
Show task information by id:
GET /api/v1/task/{id}
parameters:- id : UUID
-
Create new task:
POST /api/v1/task
parameters:- task : TaskDto
-
Change description or dueDate of task:
PUT /api/v1/task
parameters:- task : TaskDto
-
Change task status:
PATCH /api/v1/task/{id}/status/{status}
parameters:- id : UUID
- status: Task.Status
-
Delete all tasks:
DELETE /api/v1/task
TaskDto JSON example for creating a new task (although this JSON is not required for creating a new task):
{
"description": "Changed Description",
"dueDate": "2022-03-03 22:01:02"
}
TaskDto JSON example for updating (TaskDto JSON is required for creation a new task. ID field is required only):
{
"id": "37977342-d666-4ef8-9c14-3d9f06678bfb",
"description": "Changed Description",
"dueDate": "2022-03-03 22:01:02"
}