Challenge Overview
In the previous challenges, we created an endpoint in ap-review-microservice to fetch the available review opportunities. In this challenge, we want to make some changes in the /reviewOpportunities endpoint and create an endpoint to get the details for a review opportunity.
Detailed requirements
-
Currently, the values of the subTrack field returned by the /reviewOpportunities endpoint does not match the values of the subTrack field return by the /challenges endpoint. For example, First2Finish should be FIRST_2_FINISH.
-
Create a new secured endpoint (token is required) GET /reviewOpportunities/:challengeId which takes the challenge ID as route parameter and returns the details for the review opportunity. This endpoint should return all the details that the /reviewOpportunities endpoint currently returns plus the following details:
- applications. Array with all applications for the current review opportunity. Each application should have the following format:{
handle: “thomaskranitsas”,
role: “Reviewer”,
status: “Pending”,
applicationDate: “2017-12-22T09:16:00.000-05:00”
}- phases. Array with all challenge phases. Each phase should have the following format:
- terms. Array with all challenge terms. Each term should have the following format:
- detailedRequirements. The challenge detailed requirements.
You can see the exact format of the phases, terms & detailedRequirements in this example API call http://api.topcoder.com/v3/challenges/30061526 -
Add the new endpoint in both the swagger definition and the postman collection.
-
Make sure the current tests are passing and create new tests to cover any new functionality.
Github repos:
-
https://github.com/appirio-tech/ap-challenge-microservice (As reference to fix req. 1)
Request access to the Github repos in the challenge forum.