HUB
Sign inSign up

springfieldm14/car-api

By springfieldm14

•Updated over 2 years ago

car api with 1000 mock vehicle records

Image
0

191

springfieldm14/car-api repository overview

⁠Car API based on spring-boot

  • uses h2 to store 1000 records of vehicle data
  • mock vehicle data is included /src/main/resources/cars.json
⁠endpoints
 @GetMapping("/cars/list")
 @GetMapping("/cars/by-year/{year}")
 @GetMapping("/cars/by-model/{model}")
 @PostMapping(path = "/new-car", consumes = MediaType.APPLICATION_JSON_VALUE, produces = "application/json")

JSON post raw body for /new-car

{
"vin": "32345234444",
"make": "honda",
"model": "pilot",
"color": "silver",
"year": "2019"
}

⁠Running the API as a container

docker run -d -p 8080:8080 --rm --name carapi mycarapi

Tag summary
Recent tags
Content type
Image
Digest
sha256:23120913d…
Size
104.9 MB
Last updated
over 2 years ago
docker pull springfieldm14/car-api:latest