Jean CAYLUS
In the V2 type we mask some fields, because we might have differents clients accessing our API. For example customers VS employees...
I added a POST endpoint to the classic API (v1).
I created helper function to handle the file reading and made the requests function to use the file handler. Now all data is stored inside a products.json database.
I added PUT endpoint, which is valide if any combination of price, description and price. It will updates the product object with a 200 status.
The new route for search is GET /api/products/search. It takes one or more of the following parameters:
name(str) : case-sensitive name searchminPrice: min pricemaxPrice: max price
Example : /api/products/search?name=tv&maxPrice=600 search for a products which name includes tv and has a price less to 600.