Api que fazer a ponte entre o cliente e os coletores visando facilitar o descarte de lixo reciclavel
- TDD
- SOLID
- Observer
- Injeção de Dependencia
- Geração de automatica do Swagger com Springdoc
- Tratamento de resposta de erro
- clone o repositorio
- builde projeto:
$ ./mvnw clean package
- execute:
$ java -jar target/api-terra-tech-0.0.1-SNAPSHOT.jar
endereço da api localhost:8080/api
/documentation
-
POST
-
REGISTER
/auth/register
TO SEND :
{ "name": "John Doe", "email": "john@doe.com", "password": "password", "confirmPassword": "password", "dateOfBirth": "YYYY-mm-dd", "role": "USER or COLLECTOR" }
-
LOGIN
/auth/login
TO SEND :
{ "email": "john@doe.com", "password": "password", }
-
GET
/v1/users/{id}
RESPONSE :
{ "id": 1, "name": "John Doe", "email": "john@doe.com", "password": "password", "dateOfBirth": "YYYY-mm-dd", "address": { "cep": "00000000", "number": "00" }, "residues": [] }
-
POST
-
REGISTER
/residue/register
TO SEND :
{ "tipo": "PLASTICO", "estado": "PENDENTE", "quantidade": "1", "descricao": "descricão", }
-
-
PUT
/v1/users/{id}
-
DELETE
/v1/users/{id}
-
NOTIFY
/v1/users/notify
- GET
RESPONSE :
/v1/collectors/{id}
{ "id": 1, "name": "John Doe", "email": "john@doe.com", "password": "password", "dateOfBirth": "YYYY-mm-dd", }
- PUT
/v1/collectors/{id}
- DELETE
/v1/collectors/{id}
- RECEIVE - NOTIFICATION
/v1/collectors/notification
-
GET
/residue/{id}
RESPONSE :
{ "id": 1, "tipo": "PLASTICO", "estado": "PENDENTE", "quantidade": "1", "descricao": "descricão", }
-
PUT
/residue/{id}
-
DELETE
/residue/{id}