nascimento-felipe / Store

CRUD for products using Java and Spring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store

API for stock management using Java, Spring and PostgreSQL

Mappings:

GET

Get all items - returns all items stored in the Product table

GET /product
Parameter Type Description
none none none

Get all items with specific name

GET /product/productName
Parameter Type Description
productName string Required. Name of item to search for

Get item with specific id

GET /product/findById/id
Parameter Type Description
id UUID Required. Id of the item to be returned

POST

Insert product into database

POST /product
Parameter Type Description
none none none

Request body:

JSON containing fields of the item being saved to the database:

String productName, String description, String category, float price, int stockQuantity

Example:

{
    "productName": "anime shirt",
    "description": "a black shirt with akame from akame ga kill",
    "category": "clothes",
    "price": 12.3,
    "stockQuantity": 1
}

PUT

Update existing product using id

PUT /product/id
Parameter Type Description
id UUID Required. Id of the item to be updated

DELETE

Remove a product from the database

DELETE /product/id
Parameter Type Description
id UUID Required. Id of the item to be deleted

About

CRUD for products using Java and Spring


Languages

Language:TypeScript 69.3%Language:Java 20.8%Language:JavaScript 6.6%Language:CSS 3.3%