Topcoder Project Service - Merge postman file

Register
Submit a solution
The challenge is finished.

Challenge Overview

Merge and update postman file.

Project Background

We are in the process of updating the Project Service API from “v4” to “v5”. The update to “v5” has been already done in a separate branch `v5-upgrade`. At the same time in parallel, we have been making changes in the `dev` branch (current v4 API). And we already merge new changes done in `dev` to `v5-upgrade` so our new “v5” version has the latest code. The only 2 files left not yet merged. And in this challenge, we would merge and update one of them - the postman file.

Technology Stack

Code access

The work for this challenge has to be done in one repository:
- Project Service repo https://github.com/topcoder-platform/tc-project-service branch v5-upgrade commit b477a8e337328058a0042555e27d97045a05a72f or later.

- A quick guide with a config for local setup is provided on the forum.

Individual requirements

  • During the work on “dev” branch, there were some new endpoints have been added to postman.json file.

  • We should move them to the current postman file in ”v5-upgrade” branch and update them to follow “v5” standard:
    - when we send to the server data in “body” we shouldn’t use “param” anymore. For example, before for the request “POST {{api-url}}/v4/projects/1/workstreams/{{WorkStreamId}}/works” we send body like this: ‘{ “param”: { "name": "test project" } }’, in “v5” we don’t need “param” anymore and we should send data directly inside the body ‘{ "name": "test project" }
    - when we get data from the server: before we get the actual data inside “<response>.result.content”, in the “v5” we get the actual data directly in “<response>”. Note, that the postman file uses tests to read responses and put “id” of new objects into environment variables, so such tests should be updated accordingly, see an example.

  • Also, there are a couple of improvements have been done to the current versions of Postman file, which we also have to apply to the newly added endpoints in “dev” if we didn’t apply it yet:
    - use “{{api-url}}” as a base for URLs instead of “{{api-url}}/v4
    - when we create any kind of object, we should put its “id” or ”key”  into a postman environment variable like this
    - requests which use an “id”/”key” in URL should use it from the environment variable instead of having it hardcoded. For example, request “{{api-url}}/v4/projects/1/workstreams” uses project id which is hardcoded, so it should use the env variable {{projectId}} instead of “1”: “{{api-url}}/projects/{{projectId}}/workstreams”.

General requirements

  • Keep the current version 2.1.0 of the postman file.



Final Submission Guidelines

  • Git patch.

  • The winner would be required to raise a PR to the repository.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

Challenge links

ID: 30105063