In this project we create an e-commerce's Wishlist using API Spring boot and git and swagger.
- SWAGGER with endpoints access
- Client Register
- Product Register
- Add product in Client's wishlist
- Remove product in Client's wishlist
- Consult all products of Client's wishlist
- Consult if a determined product is in Client's wishlist
$ git clone git@github.com:ra-eng/JavaGirls.git
- Open the project in the Editor
- After that you can RUN
- Run project
- Start swagger: http://localhost:8080/swagger-ui.html
Input: POST:"/clients"
{
"cpf": "123.456.789-10",
"email": "email@gmail.com",
"name": "Name",
"password": "password"
}
Input: POST:"/products"
{
"name": "Name ,
"price": $20,
"details": "details",
"category": "category",
"image": "image"
}
Input: GET:"/products"
[
"id": 1,
"name": "cadeira",
"price": 200,
"details": "details",
"category": "sala",
"image": "cadeira.png"
},
{
"id": 3,
"name": "cadeira gamer",
"price": 900,
"details": "details",
"category": "sala",
"image": "cadeira.png"
},
{
"id": 5,
"name": "iphone",
"price": 10000,
"details": "details",
"category": "telefonia",
"image": "iphone.png"
},
{
"id": 9,
"name": "calça",
"price": 5,
"details": "details",
"category": "vestimenta",
"image": "bbb.png"
}
]
GET:"/wishlist/{clientId}"
[
"id": 1,
"name": "cadeira",
"price": 200,
"details": "details",
"category": "sala",
"image": "cadeira.png"
},
{
"id": 3,
"name": "cadeira gamer",
"price": 900,
"details": "details",
"category": "sala",
"image": "cadeira.png"
}
]
Post:"/wishlist/{clientId}/{productId}" Link clientId to productId
{
"id": 1,
"cpf": "123.456.789-00",
"name": "Alexa",
"email": "email@gmail.com",
"password": "password",
"products":[
"id": 1,
"name": "cadeira",
"price": 200,
"details": "details",
"category": "sala",
"image": "cadeira.png"
},
{
"id": 3,
"name": "cadeira gamer",
"price": 900,
"details": "details",
"category": "sala",
"image": "cadeira.png"
}
]
}
Deletes a product in client's wishlist by id Input: DELETE:"/wishlist/{clientId}/{productId}"
"Product removed.Parabens"
Input: POST:"/wishlist/{clientId}/product/{name}"
{
"id": 1,
"cpf": "123.456.789-00",
"name": "Alexa",
"email": "email@gmail.com",
"password": "password",
"products": [
"id": 9,
"name": "calça",
"price": 5,
"details": "details",
"category": "vestimenta",
"image": "bbb.png"
]
}