Skip to content

conorheffron/shoppingcart-scala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shoppingcart-scala

License: GPL v3

Scala CI

SonarQube

Quality gate

SonarQube Overall Code Summary

Shopping Cart Test Data (product title & price)

Tech:

  • Java 21 (LTS), SBT 1.11.6, Scala 3.7.2, ZIO 2, IntelliJ IDEA 2025.2.1 (Community Edition), SCoverage

SBT shell build.

  • clean package test

sbt-shell-clean-package-test

Run Sample Cart Calculation via Spec test suite.

shopping-cart-sample-spec

Main class run - prints each valid product info

main-list-products-info

Run Rest API Application

com.siriusxm.example.restApiApplication

GET Request End-point (Browser Link)

http://localhost:8080/product/info?titles=cheerios,cornflakes,frosties,shreddies,weetabix

GET Request End-point (Curl)

shopping-cart-scala % curl -Xcurl -XGET "http://localhost:8080/product/info?titles=cheerios,cornflakes"                            

{"cheerios":8.43,"cornflakes":2.52}

GET Response JSON in Browser (key, value pairs of product_name -> price)

GET-product-info-endpoint