Skip to content

lghimfus/RCProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rentalcars Graduate Technical Test

How to use

Clone the repository git clone https://github.com/lghimfus/RCProject.git

Use Maven to build the project mvn clean package

Use Maven to test the code mvn test

Run part 1 - Console application

java -cp target/RCProject-0.0.1-SNAPSHOT-jar-with-dependencies.jar com.lghimfus.app.RCProject.ConsoleApplication

Run part 2 - REST application

java -cp target/RCProject-0.0.1-SNAPSHOT-jar-with-dependencies.jar com.lghimfus.app.RCProject.RestApplication

REST application endpoints

localhost:4567/vehiclesByPrice
localhost:4567/vehiclesBySpecs
localhost:4567/vehiclesBySupplierRating
localhost:4567/vehiclesByScore

NOTE:

The above endpoints return text/plain response containing the same output as the console application. However, each endpoint supports the query parameter json which recognizes two values: full and custom.

  • ?json=full returns an application/json response containing the JSON representation of a list of vehicles where a vehicle node contains all the fields available in a Vehicle class.
  • ?json=custom returns an application/json response containing the JSON representation of a list of vehicles, but a vehicle node contains just the fields required for printing in part 1 (tasks 1-4).

Additional possible requests

localhost:4567/vehiclesByPrice?json=full
localhost:4567/vehiclesByPrice?json=custom

localhost:4567/vehiclesBySpecs?json=full
localhost:4567/vehiclesBySpecs?json=custom

localhost:4567/vehiclesBySupplierRating?json=full
localhost:4567/vehiclesBySupplierRating?json=custom

localhost:4567/vehiclesByScore?json=full
localhost:4567/vehiclesByScore?json=custom

localhost:4567/vehicles

Built with

Source tree

About

A project for Rentalcars.com technical test.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages