Challenge Overview
In this challenge, we would like to add additional traits to the member profile.
Detailed Requirements
-
The requirement is to make the additional traits dynamic so we can add more traits easy. The idea is that a trait will have the following format with the traits property being a JSON object:
{
"trait_id": "BASIC_INFO",
"category_name": "Basic Info",
"created_at": "2018-03-30T00:00:00.000Z",
"created_by": 40309246,
"updated_at": "2018-03-30T00:00:00.000Z",
"updated_by": 40309246,
"traits": {
// JSON object
// Validation will be determined based on the trait_id
}
}
A JSON file with more examples of trait objects can be found attached on the challenge forum. -
Although the traits object will be a JSON object with any format, the idea is to have a validation function for each trait_id so we have a consistent format of all entries with the same trait_id.
-
A user should be able to create only ONE entry for each trait_id.
-
If there is no validation function for a trati_id the app should return 400 BAD REQUEST.
-
Each time the traits are updated/created, we need to fire event to the kafka bus.
-
You need to build the CRUD services for /members/{handle}/traits.
-
Update the swagger definition in the repo to include the new endpoints.
-
Create POSTMAN tests for the new endpoints.
About current application:
-
Existing Topcoder Services technologies using Java 8 with Maven 3, Docker and Docker Compose, DynamoDB, AWS, ElasticSearch
-
Base Submission: https://github.com/appirio-tech/ap-member-microservice
-
Github Self Registration for the repo: https://ragnar.topcoder.com/api/v1/github/teams/registration/9a476237-a754-4ef6-b4d7-dfd92e4e8e7b-1523461917737
If the self registration link does not work for you, please request access by posting your Github username on the challenge forum if you can’t access the repo.
Feel free to ask any questions on the challenge forum!
Final Submission Guidelines
Submit a git patch against the latest commit in the dev branch.
The winner must create a pull request against the dev branch in our repo.