Implement ecommerce with Maven modules for each layer of the Hexagonal Architecture and without waiting for the necessary services to be available.
-
GET /api/products
-
GET /api/products/{productId}
-
GET /api/users/{userId}/basket
-
POST /api/users/{userId}/basket
- GET /api/products
[
{
"id": 1,
"name": "Dell Latitude 3301 Intel Core i7-8565U/8GB/512GB SSD/13.3",
"price": "999,00 €"
},
{
"id": 2,
"name": "Samsonite Airglow Laptop Sleeve 13.3",
"price": "41,34 €"
},
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
},
{
"id": 4,
"name": "Fellowes Mouse Pad Black",
"price": "1,34 €"
}
]
- GET /api/products/{productId}
{
"product": {
"id": 1,
"name": "Dell Latitude 3301 Intel Core i7-8565U/8GB/512GB SSD/13.3",
"price": "999,00 €"
},
"cross_selling": [
{
"id": 2,
"name": "Samsonite Airglow Laptop Sleeve 13.3",
"price": "41,34 €"
},
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}
]
}
- GET /api/users/{userId}/basket
{
"id": 1,
"userId": 1,
"items": {
"products": [
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}
]
}
}
- POST /api/users/{userId}/basket
{
"id": 3,
"name": "Logitech Wireless Mouse M185",
"price": "10,78 €"
}