REST API to control a digital library.
Project developed during Alura Bootcamp Java.
- Spring
- Spring Initializr
- Spring Web
- Spring Dev Tools
- Spring Validation
- Spring Boot
- Maven
- ModelMapper
- Project Lombok
- Java 11
- JPA/Hibernate
- Flyway
- Swagger
- Postman collection
- Automated tests
- Datasources
Execute the class LivrariaApiApplication.java
as a normal Java Application and then check the API through its documentation at http://localhost:8080/swagger-ui.html.
METHOD | END-POINT | DESCRIPTION | FIELDS |
---|---|---|---|
POST | http://localhost:8080/auth | User authentication | login, password |
POST | http://localhost:8080/autores | Register a new author. | nome, dataNascimento, nacionalidade, curriculo |
GET | http://localhost:8080/autores | Get a list of authors. | |
PUT | http://localhost:8080/autores | Update an author. | nome, dataNascimento, nacionalidade, curriculo |
DELETE | http://localhost:8080/autores | Delete an author. | |
GET | http://localhost:8080/autores/{id} | Get an author's details. | |
POST | http://localhost:8080/livros | Register a new book. | titulo, dataLancamento, numeroPaginas, autor |
GET | http://localhost:8080/livros | Get a list of books. | |
PUT | http://localhost:8080/livros | Update a book. | titulo, dataLancamento, numeroPaginas, autor |
DELETE | http://localhost:8080/livros | Delete a book. | |
GET | http://localhost:8080/livros/{id} | Get a a book's details. | |
GET | http://localhost:8080/relatorios/livraria | Get the library reports. | |
GET | http://localhost:8080/usuarios | Get a list of users | |
POST | http://localhost:8080/usuarios | Register a new user. | login, nome, perfilId |
GET | http://localhost:8080/usuarios/{id} | Get a user's details. | |
PUT | http://localhost:8080/usuarios | Update a user's details. | id, login, nome, perfilId |
DELETE | http://localhost:8080/usuarios/{id} | Delete a user. |