96hrs!! Topcoder API - Improve Draft Challenge API

Register
Submit a solution
The challenge is finished.

Challenge Overview

Previously, we have simplified the Draft Challenge API (Topcoder API - Simplify Draft Challenge API and Adhere to Standard API Specification).

This challenge is going to make improvement for this API.

1. Add ability to specify task when creating challenge

In Topcoder Direct, we are supporting to make First2Finish and Design First2Finish challenges as Task (private challenge). So we'd like to add support in Draft Challenge API too.

Basically, for input,
a. Add a new field (task  - boolean type) to indicate if a challenge is task, this flag is only applied to First2Finish and Design First2Finish challenges.  this is set into Private Project Status property.
b. Add a new field (assignees - string array type), which specifies a list of topcoder handles which will be pre-registered for the task, this field will be used only if the task flag is true and the challenge type is First2Finish and Design First2Finish.

before communicating with TC Direct, the requests should be properly formed based on the above rules.

Reference
https://github.com/appirio-tech/direct-app/blob/dev/components/project_management/src/java/main/com/topcoder/management/project/ProjectPropertyType.java#L367
https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/contest/launch/SaveDraftContestAction.java#L2399

2. Include names for integer array like fields, for example, technologies, platforms, challenge types, finalDeliverableTypes.

instead of making the input like [1, 2], we like to make the json object array by adding the name field, this field is not used in the final request, but would be more clear to understand the api request.

so the related field should be like [{"Id":1,"name":"node"}, {"Id":2,"name":"Java"}]

3. Improve the error messages

Currently, we saw things like "Operation failed in the contest service facade."

When I look in the log, I see the more detailed reason:

"The billing account id set to contest is not belong to the project"

Please add that level of detail to the responses.

General Requirements

1. swagger.yaml should be updated to reflect the changes.
2. The API requests and responses should follow the v3 API standards.

About Local Setup

- The Create Draft Challenge API need to communicate with Direct App, Please check https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/direct-app about how to build, deploy and run direct-app locally.
- Please check ap-challenge-microservice.zip/docs/Deployment Guide.docx about how to run the service and test with the API.



 

Final Submission Guidelines

- Code changes to fix the problems
- Updated swagger.yaml file
- Update the Deployment Guide and Verification Steps

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30056121