Skip to content

Latest commit

 

History

History
84 lines (61 loc) · 1.22 KB

File metadata and controls

84 lines (61 loc) · 1.22 KB

wishlist-api

Java Badge Spring Boot Badge Mongo Badge

Prerequisites

  • Java 21
  • Maven 3
  • Docker compose

Run

$ mvn clean package
$ docker compose up -d

Access: http://localhost:8080/swagger-ui/index.html

After runnning maven clean package, open target/site/jacoco/index.html in browser to see Test Coverage Report

image


Using

  • Clean Arquitecture
  • Docker
  • MongoDB
  • Tests (UnitTests, E2E Tests and SpockTests)

ENDPOINTS

POST customers/{customerId}/products

Body:

{
    id: "1",
    name: "Product name",
    price: 10.5
}

GET customers/{customerId}/products

Response:

[
    {
        id: "1",
        name: "Product name",
        price: 10.5
    },
    {
        id: "2",
        name: "Product name 2",
        price: 15.2
    }
]

GET /customers/{customerId}/products/{productId}/exists

Response:

{
    exists: true|false
}

DELETE /customers/{customerId}/products/{productId}