diff --git a/specs/swagger.yml b/specs/swagger.yml index 871370ee8..f326c8c27 100644 --- a/specs/swagger.yml +++ b/specs/swagger.yml @@ -1381,7 +1381,7 @@ paths: required: true type: string responses: - '201': + '204': description: Created headers: X-Timestamp: @@ -1471,7 +1471,6 @@ paths: description: Not Found '500': description: Internal Server Error - '/microservices/{uuid}/port-mapping-list': get: tags: - Microservices @@ -1489,7 +1488,7 @@ paths: required: true type: string responses: - '201': + '200': description: Created schema: $ref: '#/definitions/PortMappingsListResponse' diff --git a/src/routes/microservices.js b/src/routes/microservices.js index 65c8e3093..6dc6fd813 100644 --- a/src/routes/microservices.js +++ b/src/routes/microservices.js @@ -146,7 +146,7 @@ module.exports = [ method: 'post', path: '/api/v3/microservices/:uuid/routes/:receiverUuid', middleware: async (req, res) => { - const successCode = constants.HTTP_CODE_CREATED; + const successCode = constants.HTTP_CODE_NO_CONTENT; const errorCodes = [ { code: constants.HTTP_CODE_BAD_REQUEST, @@ -252,7 +252,7 @@ module.exports = [ }, { method: 'get', - path: '/api/v3/microservices/:uuid/port-mapping-list', + path: '/api/v3/microservices/:uuid/port-mapping', middleware: async (req, res) => { const successCode = constants.HTTP_CODE_SUCCESS; const errorCodes = [ diff --git a/tests/Controller Testing.postman_collection.json b/tests/Controller Testing.postman_collection.json index 4b593b828..65d0c8038 100644 --- a/tests/Controller Testing.postman_collection.json +++ b/tests/Controller Testing.postman_collection.json @@ -3445,7 +3445,7 @@ "script": { "id": "4f7a9f52-12cc-49d0-9e2f-147b6f5cb6fa", "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" + "tests[\"Status code is 204\"] = responseCode.code === 204;" ], "type": "text/javascript" } @@ -3616,7 +3616,7 @@ "raw": "" }, "url": { - "raw": "{{host}}/api/v3/microservices/{{ms-id}}/port-mapping-list", + "raw": "{{host}}/api/v3/microservices/{{ms-id}}/port-mapping", "host": [ "{{host}}" ], @@ -3625,7 +3625,7 @@ "v3", "microservices", "{{ms-id}}", - "port-mapping-list" + "port-mapping" ] } },