Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug portmapping and routes api fixes #354

Merged
merged 11 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions specs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ paths:
required: true
type: string
responses:
'201':
'204':
description: Created
headers:
X-Timestamp:
Expand Down Expand Up @@ -1455,7 +1455,7 @@ paths:
schema:
$ref: '#/definitions/PortMappingsRequest'
responses:
'201':
'204':
mchepelev marked this conversation as resolved.
Show resolved Hide resolved
description: Created
schema:
$ref: '#/definitions/PortMappingsPublicResponse'
Expand All @@ -1471,7 +1471,6 @@ paths:
description: Not Found
'500':
description: Internal Server Error
'/microservices/{uuid}/port-mapping-list':
get:
tags:
- Microservices
Expand All @@ -1489,7 +1488,7 @@ paths:
required: true
type: string
responses:
'201':
'200':
description: Created
schema:
$ref: '#/definitions/PortMappingsListResponse'
Expand Down
6 changes: 3 additions & 3 deletions src/routes/microservices.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -202,7 +202,7 @@ module.exports = [
method: 'post',
path: '/api/v3/microservices/:uuid/port-mapping',
middleware: async (req, res) => {
const successCode = constants.HTTP_CODE_CREATED;
const successCode = constants.HTTP_CODE_NO_CONTENT;
mchepelev marked this conversation as resolved.
Show resolved Hide resolved
const errorCodes = [
{
code: constants.HTTP_CODE_BAD_REQUEST,
Expand Down Expand Up @@ -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 = [
Expand Down
8 changes: 4 additions & 4 deletions tests/Controller Testing.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -3541,7 +3541,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;"
],
mchepelev marked this conversation as resolved.
Show resolved Hide resolved
"type": "text/javascript"
}
Expand Down Expand Up @@ -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}}"
],
Expand All @@ -3625,7 +3625,7 @@
"v3",
"microservices",
"{{ms-id}}",
"port-mapping-list"
"port-mapping"
]
}
},
Expand Down