Register
Submit a solution
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Implement CRUD endpoints for TimelineTemplates and Phases.

  • Extend all Challenge endpoints to include information about prize sets and prizes, phases, and timelineTemplateId.

  • Update the existing Swagger doc to reflect the new changes.

Tech Stack

  • Node.js

  • Express.js

  • Swagger

  • AWS DynamoDB

Project Background

In this series of challenges, we will build the version 5 (V5) of the Challenge engine API.

Code Access

Repo: https://github.com/topcoder-platform/challenge-api-v5

Branch: develop

Detailed requirements

1. Implement CRUD endpoints for TimelineTemplates and Phases

Refer to the ERD image inside the /docs directory of the project folder.

You need to:

  • Describe the new CRUD endpoints for the TimelineTemplate entities to the Swagger definition. (/timelineTemplates)

  • Implement the CRUD endpoints for the TimelineTemplate entities.

  • Only admins can create/update/delete timeline templates.

  • Remove the Field property.

  • Only name & isActive are required.

  • Describe the new CRUD endpoints for the Phase to the Swagger definition. (/challengePhases)

  • Implement the endpoints for the Phase entities.

  • Remove the Field property.

  • Add a duration (Number) property.

  • Only name & duration are required.

  • A TimelineTemplate can have many Phases through the phases property.

2. Extend the challenge endpoints

You need to modify the following endpoints (all available methods):

  • /challenges

  • /challenges/:challengeId

 

You need to introduce a new property named prizeSets to the challenge model.

The new property is an array of objects and each object has the following format:

{

 "type": "String",

 "description": "String | optional",

 "prizes": [

   {

     "description": "String | optional",

     "type": "String",

     "value": Number

   }

 ]

}

 

As part of this challenge, prizeSet types and prize types should be configured in the app’s constants.

 

Change the validation so each challenge must have at least one prizeSet and each prizeSet must have at least one prize.

 

Add a required timelineTemplateId (string) property to the challenge object so we can associate a Challenge with a TimelineTemplate.

 

Add a required phases (array) property to the challenge object.

Each element in the phases array will be a Phase object.

 

The idea is that admins will be able to define different TimelineTemplates (for example `Standard Code Timeline` or `Standard Code with final fixes`) and copilots we will be able to pick a template which will copy all phases from the template into the challenge object and we’ll be able to modify the duration of each phase within the challenge object.

 

Update the Swagger doc to reflect the above changes.

Important notes

  • Update the provided Swagger file to reflect any changes made during development.

  • Update the existing POSTMAN tests to reflect any changes.

  • All new endpoints must have positive and negative POSTMAN tests.

  • Performance and stability are very critical.

 

Should you have any questions, feel free to ask on the challenge forum!

What to Submit

Submit a git patch for the latest commit in the develop branch.



Final Submission Guidelines

Please read above

ELIGIBLE EVENTS:

Topcoder Open 2019

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30085397