Pre-built jar is in target/RentalcarsAssessment1.jar
The carparser package contains the code for parsing and displaying the cars data.
The Gson JSON library is bundled
Pre-built jar is in target/RentalcarsAssessment2.jar
The carapi package contains the code for the REST api and it makes use of the code in the carparser package from the earlier part.
The dependency of the Spark web microframework is bundled in addition to Gson
Both JAR files must be run from the target working directory
Method | Endpoint | Query parameters | Output |
---|---|---|---|
GET | /cars | sort_type, reverse | [sipp, name, price, supplier, rating] |
GET | /cars/:car | sort_type, reverse | sipp, name, price, supplier, rating, score, summed_score, sipp_detail |