This project is a Spring Boot-based application designed to manage user information for a technology company. It provides RESTful APIs to create, retrieve, and manage company-related data, including company details and user profiles.
Execute the next command to run the application with docker-compose
docker-compose up -d
ti_users
.src/main/resources/application.yml
with your MySQL user and password.mvn clean install
mvn spring-boot:run
http://localhost:8080
.Below are the details of the available endpoints:
POST /api/v1/departments
- Save a new department.
{
"name": "Finanzas",
"description": "departamento encargado de las finanzas globalmente.",
"companyId": 2
}
PUT /api/v1/departments/{id}
- Update a existing department.
{
"name": "Finanzas Comerciales",
"description": "departamento encargado de las finanzas globalmente."
}
POST /api/v1/users
- Create a new user.
{
"name": "Chris",
"lastname": "Brown",
"address": "Mid Street",
"position": "Talent Manager",
"telephone": "3231234212",
"residenceCity": "New York",
"state": true,
"companyId": 1,
"departmentId": 1
}
GET /api/v1/users?companyId=2
- Get users by company ID.
DELETE /api/v1/users/{id}
- Delete a determinate user.
POST /api/v1/companies
- Crea una nueva compañía.
{
"name": "Fake Name",
"address": "Calle 28",
"operationCity": "Fake City"
}
GET /api/v1/companies?page=0
- Get a list of companies with pagination.
The project uses Cucumber for integration testing. To run the tests, execute:
mvn test