- Download the zip
- Unzip the file
- Open Intellij
- File -> Open-> Navigate to the unzipped folder
- Click on the pom.xml file -> Open as Project
- Choose the Spring Boot Application file (search for @SpringBootApplication)
- Right Click on the file and Run 'PetstoreApplication'
If you want to add one or more users manually
POST localhost:8080/api/users
and in the body select raw and add data in the following format
{
"firstName":"Annie",
"lastName" : "Walker",
"email" : "annie@test.com",
"budget" : 120.0
}
If you want to add 1-10 users with api
POST localhost:8080/api/users/create-all/{numUsers}
ex. POST localhost:8080/api/users/create-all/3
and in the body select none
If you want to see the users added to the list
GET localhost:8080/api/users
If you want to add one or more pets manually
POST localhost:8080/api/pets
and in the body select raw and add data in the following format
{
"name": "Biscuit",
"type": "CAT",
"description": "Abyssinian",
"dateOfBirth": "Jun 1, 2020",
"rating": -1,
"owner": null,
"price": 2.0
}
If you want to add 1-20 pets with api
POST localhost:8080/api/pets/create-all/{numPets}
ex. POST localhost:8080/api/pets/create-all/8
and in the body select none
If you want to see the pets added to the list
GET localhost:8080/api/pets
if you want to go all over the users and try to buy a pet of the store
POST localhost:8080/api/purchase/buy
if you want to see all of the users that bought a pet
GET localhost:8080/api/purchase