Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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 to/filter/price/{initial_range}/{final_range}:
returns a collection of all products whose price is between the initial and the final range supplied
The response code is 200, and the response body is an array of products in the price range provided.
In case there are no such products return status code 400.
GET request to/sort/price:
returns a collection of all products sorted by their pricing
The response code is 200 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions