Challenge Overview

Challenge Objectives

  • Create swagger specification for CRUD endpoints related to countries and educational institutions

  • Implement the endpoints in Nodejs

 

Project Background

  • The lookup api aims to provide an api to be used across Topcoder’s front end apps that provide a consistent set of results for actions such as looking up countries, educational institutions and others.

 

Technology Stack

  • Swagger specification version 2.0

  • Nodejs version 10

 

Code access

This is the first contest in the series so there is no source code to share

 

Individual requirements

Create a Swagger specification (Major Requirement)

  • There will be two resources in scope for this contest: countries and educational institutions.

  • You need to follow the v5 standards document that we will share with you in the contest forum. These standards describe how we need to model our resources and endpoints.

  • For reference purposes, you can also refer to the submission api, which is also based off the v5 standards. However, note that while submission api uses generators, you need to use async await pattern.

  • You need to create the swagger based specification for CRUD and HEAD based endpoints for countries and educational institutions.

  • Each of them, country and educational institution, will have two attributes - an id field and a name. Depending on the http method, these attributes can be created, read, updated or the entire resource can be deleted. Id field will have to be generated by the app and cannot be passed during resource creation / update.

  • You need to support pagination

 

Implement the endpoints in Nodejs (Major Requirement)

  • After writing the specification, proceed to implement them in Nodejs.

  • Use Express js as your server framework.

  • Implement all the endpoints to match the specification defined in Swagger.

  • Use Dynamodb as your database.

  • The endpoints will have a prefix of “/v5/lookups”. Countries will come under “/v5/lookups/countries” and “/v5/lookups/educationalInstitutions”

 

Deployment guide and validation document

Create a deployment guide using markdown. Provide instructions on how to deploy your app locally.

 

Important Notes

  • Use standard as your linter. Ensure there are no lint errors and create a npm script to allow us to run the linter.

  • You need to provide unit tests and end to end tests using mocha and chai for all the endpoints. Reviewers will consider the section in the scorecard dedicated for tests and not consider this in the Major Requirements section. Test coverage needs to be more than 80%.
  • ���Each endpoint requires authorization. Follow the same logic as used by the submission api in securing the endpoints. You do not have to worry about which users are allowed access - Topcoder User or Copilot roles or scopes or something similar as long as you make provisions to allow us to update them. Use the tc-core-library-js for your authentication purposes. (You will find examples in the submission api on how you can use this module).


Final Submission Guidelines

Zip your source code and upload it to Topcoder. Ensure that there are no lint errors, that it has the swagger specification in it and also the Deployment Guide.

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30092274