Shopping basket is a spring application for adding and deleting products from basket.
Go to the project folder.
Execute mvn install:
mvn install -DskipTests
Build docker image with docker:
docker build -t shopping-basket:{version of app} .
Load docker image into minikube:
minikube image load shopping-basket:{version of image}
Go to the kubernetes folder in the project folder.
Build helm dependencies:
helm dependency build ./shopping-basket
Execute helm install
helm install shopping-basket ./shopping-basket
GET /products
POST /baskets
PUT /baskets/{basketId}/{productId}/{quantity}
Parameter | Type | Required | Description |
---|---|---|---|
basketId |
string |
YES |
Id of basket |
productId |
string |
YES |
Id of product to add |
quantity |
int |
YES |
Quantity of products to add |
DELETE /baskets/{basketId}/{productId}/{quantity}
Parameter | Type | Required | Description |
---|---|---|---|
basketId |
string |
YES |
Id of basket |
productId |
string |
YES |
Id of product to remove |
quantity |
int |
YES |
Quantity of products to remove |
GET /baskets/{basketId}
Parameter | Type | Required | Description |
---|---|---|---|
basketId |
string |
YES |
Id of basket to get |