Topcoder Connect - Project and Product Template REST API

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

In this new challenge we are adding two new endpoints to topcoder Connect.

Requirements

1. Add new models in tc-project-service for project_template and product_template

2. Add new routes in tc-project-service for project_template
-- GET /v4/projectTemplates to list all project templates of the project
-- GET /v4/projectTemplates/{templateId} to read the particular project template
-- POST /v4/projectTemplates to create new project template (Should validate the json type fields to be a valid JSON)
-- PATCH /v4/projectTemplates/{templateId} to update the given project template (Should validate the json type fields to be a valid JSON and only accept delta instead of complete object)
-- DELETE /v4/projectTemplates/{templateId} to delete the given project template

Schema:

+-----------+-------------------------+---------------+
| column    | type                    | default value |
+-----------+-------------------------+---------------+
| id        | long                    |               |
+-----------+-------------------------+---------------+
| name      | varchar(255)            |               |
+-----------+-------------------------+---------------+
| key       | varchar(45)             |               |
+-----------+-------------------------+---------------+
| category  | varchar(45)             |               |
+-----------+-------------------------+---------------+
| phases    | json                    |               |
+-----------+-------------------------+---------------+

| scope     | json                    |               |
+-----------+-------------------------+---------------+

3. Add new routes in tc-project-service for product_template
-- GET /v4/productTemplates to list all product templates of the product
-- GET /v4/productTemplates/{templateId} to read the particular product template
-- POST /v4/productTemplates to create new product template (Should validate the json type fields to be a valid JSON)
-- PATCH /v4/productTemplates/{templateId} to update the given product template (Should validate the json type fields to be a valid JSON and only accept delta instead of complete object)
-- DELETE /v4/productTemplates/{templateId} to delete the given product template

Schema:

+------------+-------------------------+---------------+
| column     | type                    | default value |
+------------+-------------------------+---------------+
| id         | long                    |               |
+------------+-------------------------+---------------+
| name       | varchar(255)            |               |
+------------+-------------------------+---------------+
| productKey | varchar(45)             |               |
+------------+-------------------------+---------------+
| icon       | varchar(255)            |               |
+------------+-------------------------+---------------+

| brief      | varchar(45)             |               |
+------------+-------------------------+---------------+

| details    | varchar(512)            |               |
+------------+-------------------------+---------------+
| aliases    | json                    |               |
+------------+-------------------------+---------------+

| template   | json                    |               |
+------------+-------------------------+---------------+


4. Unit tests for all new endpoints

5. Update swagger documentation

6. For list all endpoints, search in database is required. Follow existing code for example

7. Elastic Search is out of scope

8. Code is provided in forum

JSON fields update


1. For POST (create)
  • json field should be validated as valid JSON and saved to database.

2. For PATCH (update) only the portion of the JSON object can be sent to endpoint
  • It should be validated as valid JSON
  • It would always override the existing field or add new one if the field doesn't exist in JSON object in database
  • If the field being updated in the PATCH request is an array, it must override the entire array (no array merge)


Final Submission Guidelines

  • Zip file containing modified code
  • Updated deployment guide

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30065333