Open Sch3lp opened 9 years ago
/v1/products/
[ { "id": "1", "categoryId": "1", "name": "Club cheese", "composition": [ "gouda cheese", "salad", "tomatoes", "egg" ], "sauces": [ "mayonaise" ], "type": "Club", "price": 2.0 }, { "id": "2", "categoryId": "1", "name": "Breeze", "composition": [ "brie", "walnuts" ], "sauces": [ "honey" ], "type": "Special", "price": 3.5 }, { "id": "3", "categoryId": "2", "name": "Club Ham", "composition": [ "ham", "salad", "tomatoes", "egg" ], "sauces": [ "mayonaise" ], "type": "Club", "price": 2.0 }, { "id": "4", "categoryId": "2", "name": "Club Parma", "composition": [ "parmaham", "salad", "tomatoes", "egg" ], "sauces": [ "mayonaise" ], "type": "Club", "price": 3 } ]
http://localhost:8080/v1/products?categoryId=1
Returns only products of given categoryId.
Returns product with given id.
I figure in a mongo Collection called Products?
Products
Resource
/v1/products/
Returns
Parameters
CategoryId
http://localhost:8080/v1/products?categoryId=1
Returns only products of given categoryId.
Child paths
/{:id}
Returns product with given id.
Persistence
I figure in a mongo Collection called Products?