This microservice exposes a REST API to get the price for a given product in a specific date.
- Field 'price_list' has been renamed to 'rate_id'
- Field 'price' has been renamed to 'final_price'
- Field 'curr' has been renamed to 'ccy'
- According to the problem proposed, 'rate_id' and 'product_id' could be FK to another tables
- Hexagonal architecture is being used. Spring has been considered part of the infrastructure so there are no Spring annotations inside the 'application' folder. Use cases are being initialized inside 'infrastructure/configuration' folder
./mvnw clean install
./mvnw spring-boot:run
You can check the OpenAPI documentation:
- Using Swagger UI: http://localhost:8080/swagger-ui/index.html
- In JSON format: http://localhost:8080/v3/api-docs
- In YAML format: http://localhost:8080/v3/api-docs.yaml
You can test the endpoint like this: http://localhost:8080/api/v1/prices?brand_id=1&product_id=35455&date=2020-06-14T16:00:00Z
./mvnw clean install
./mvnw test