Question: You are provided with the implementation of the models required for all the APIs. The task is to implement a set of REST services that
You are provided with the implementation of the models required for all the APIs. The task is to implement a set of REST services that exposes the endpoints and allows for filtering and sorting the collection of product records in the following ways:
GET request tofilterpriceinitialrangefinalrange:
returns a collection of all products whose price is between the initial and the final range supplied
The response code is and the response body is an array of products in the price range provided.
In case there are no such products return status code
GET request tosortprice:
returns a collection of all products sorted by their pricing
The response code is and the reppanse body is an array of the product names sorted in ascending ofder of price
Complete the given project so that it passes all the test cases when running the provided unit tests.
Example requests and responses
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
