API to manage tasks (Todolist) made in Spring Boot for programming practices.
234
API to manage tasks (Todolist) made in Spring Boot for programming practices.
Clone git repository
git clone https://github.com/WeversonL/spring-todolist.git
cd spring-todolist
Start with docker-compose
docker-compose up -d
If you want to view the interactive swagger, access the url below in your browser. For more usage information, access the guide usage
http://localhost:8080/swagger-ui/index.html#/
The API can be accessed at localhost:8080. Swagger can be viewed at localhost:8080/swagger-ui.html
To make the HTTP requests below, the httpie tool was used:
$ http POST :8080/todos name="title" description="description task" priority=1
[
{
"id": 1,
"name": "title",
"description": "description task",
"priority": 1,
"realized": false
}
]
$ http GET :8080/todos
[
{
"id": 1,
"name": "title",
"description": "description task",
"priority": 1,
"realized": false
}
]
$ http GET ':8080/todos/pages?page=0&size=5'
[
{
"content": [
{
"id": 1,
"name": "title",
"description": "description task",
"priority": 1,
"realized": false
}
],
"empty": false,
"first": true,
"last": true,
"number": 0,
"numberOfElements": 1,
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 5,
"paged": true,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"unpaged": false
},
"size": 5,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"totalElements": 1,
"totalPages": 1
}
]
$ http PUT :8080/todos/1 name="new title" description="new description task" priority=2 realized=true
[
{
"id": 1,
"name": "new title",
"description": "new description task",
"priority": 2,
"realized": true
}
]
http DELETE :8080/todos/1
[ ]
Spring Todolist is MIT licensed.
Content type
Image
Digest
sha256:5b9c4938a…
Size
274.4 MB
Last updated
about 3 years ago
docker pull weversonlemos/spring-todolist