Oli2861 / fridgecontentservice

Reactive Spring Microservice to store fridge contents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FridgeContentService

Microservice to store fridge contents (groceries) to be used within @Coding-Udum 's project Smart2Fridge (https://github.com/Coding-Udum/Smart2Fridge).

Endpoint descriptions

Method Endpoint Description Parameters Response
GET /v1/item/bulk/{snapshotId} Endpoint to retrieve a snapshot including all corresponding items. The id of the snapshot. The date when the snapshot was saved and the ID of the snapshot and all items.
DELETE /v1/item/bulk/{snapshotId} Endpoint to delete a snapshot and all corresponding items. The id of the snapshot. The date when the now deleted snapshot was saved and the ID of the snapshot and all items.
POST /v1/item/bulk Endpoint for saving multiple elements, creates a snapshot in the process. The name of the items to be saved: [{"description" : "Banana"},{"description" : "Apple"}] URI to retrieve the saved items, including the id of the created snapshot.

Schema

SNAPSHOT
ID: SERIAL
CAPTURE_DATE: TIMESTAMP
ITEM
ID: SERIAL
SNAPSHOT_ID: INTEGER
DESCRIPTION: VARCHAR(255)
AMOUNT: INTEGER

Build & Run

cd fridgecontentservice && ./gradlew build && cd ../ && docker-compose up

About

Reactive Spring Microservice to store fridge contents


Languages

Language:Kotlin 99.7%Language:Dockerfile 0.3%