We need to add a new endpoint /bar to the FastAPI application. This endpoint should return a JSON object with a key message and a value This is a message from the bar endpoint.
Acceptance Criteria
A new route /bar should be added to the FastAPI application.
The route should return a JSON object with message key and This is a message from the bar endpoint as its value.
The implementation should follow the existing project structure and coding standards.
Files to be Modified
main.py
Example Response
{
"message": "This is a message from the bar endpoint"
}
Description
We need to add a new endpoint
/bar
to the FastAPI application. This endpoint should return a JSON object with a keymessage
and a valueThis is a message from the bar endpoint
.Acceptance Criteria
/bar
should be added to the FastAPI application.message
key andThis is a message from the bar endpoint
as its value.Files to be Modified
main.py
Example Response