Skip to content

This API allows you to manage people. In this project you can add people and addresses to them. You can also specify which is the main address of a person.

Notifications You must be signed in to change notification settings

yesminmarie/people-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 People Management 🚀

This API allows you to manage people. In this project you can add people and addresses to them. You can also specify which is the main address of a person.

You can use the Swagger to manipulate the endpoints: localhost:8080/swagger-ui.html

🚀 Technologies

It was used these technologies in this project.

💻 How to run the application

Prerequisites

You will need these tools installed in your machine:

  • It Must have Git installed
  • At least it has Java 17 installed
  • It Must have Maven installed
# Clone this repository
git clone https://github.com/yesminmarie/people-management

# Go into the folder of the project
cd people-management

# execute the project
./mvn spring-boot:run

Endpoints:

Persons:

  • POST - localhost:8080/persons (Add a new person)

Example:

{
    "name": "Maria",
    "birthDate": "11/11/1990"
}
  • GET - localhost:8080/persons/{id} (Get the person by id)

  • GET - localhost:8080/persons (Get all persons using pagination)

Example: localhost:8080/persons?page=0&size=2

  • PUT - localhost:8080/persons/{id} (Update a specific person)

Example:

{
    "name": "Ana",
    "birthDate": "11/11/2001"
}

Addresses:

  • GET - localhost:8080/addresses/{idPerson} (Get the addresses of a specific person, passing the person id)

  • POST - localhost:8080/addresses (Save a new address to a specific person)

Example:

{
    "street": "Rua Teste",
    "zipCode": "123456789",
    "number": 123,
    "city": "São Paulo",
    "idPerson": 1,
    "main": true
}
  • PATCH - localhost:8080/addresses/{idAdress} (Update the main address of a person, passing the address id that will be the main address)

Made with ❤️ by Yesmin Marie

About

This API allows you to manage people. In this project you can add people and addresses to them. You can also specify which is the main address of a person.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages