Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 10 additions & 5 deletions src/schemas/microservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const microserviceCreate = {
"type": "array",
"items": {"type": "string"}}
},
"required": ["name", "flowId", "catalogItemId"]
"required": ["name", "flowId", "catalogItemId"],
"additionalProperties": false
};

const microserviceUpdate = {
Expand All @@ -43,7 +44,8 @@ const microserviceUpdate = {
"type": "array",
"items": {"$ref": "/volumeMappings"}
}
}
},
"additionalProperties": false
};

const ports = {
Expand All @@ -54,7 +56,8 @@ const ports = {
"external": {"type": "integer"},
"publicMode": {"enum": [false]}
},
"required": ["internal", "external"]
"required": ["internal", "external"],
"additionalProperties": false
};

const portsCreate = {
Expand All @@ -65,7 +68,8 @@ const portsCreate = {
"external": {"type": "integer"},
"publicMode": {"type": "boolean"}
},
"required": ["internal", "external"]
"required": ["internal", "external"],
"additionalProperties": false
};

const volumeMappings = {
Expand All @@ -76,7 +80,8 @@ const volumeMappings = {
"containerDestination": {"type": "string"},
"accessMode": {"type": "string"}
},
"required": ["hostDestination", "containerDestination", "accessMode"]
"required": ["hostDestination", "containerDestination", "accessMode"],
"additionalProperties": false
};

module.exports = {
Expand Down
6 changes: 3 additions & 3 deletions tests/Controller Testing.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3137,7 +3137,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"name2\",\n \"config\": \"string\",\n \"catalogItemId\": {{item-id}},\n \"flowId\": {{flow-id}},\n \"ioFogNodeId\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ],\n \"ports\": [\n {\n \"internal\": 1,\n \"external\": 1,\n \"publicMode\": false\n }\n ],\n \"routes\": [\n ]\n}\n"
"raw": "{\n \"name\": \"name2\",\n \"config\": \"string\",\n \"catalogItemId\": {{item-id}},\n \"flowId\": {{flow-id}},\n \"iofogUuid\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ],\n \"ports\": [\n {\n \"internal\": 1,\n \"external\": 1,\n \"publicMode\": false\n }\n ],\n \"routes\": [\n ]\n}\n"
},
"url": {
"raw": "{{host}}/api/v3/microservices",
Expand Down Expand Up @@ -3287,7 +3287,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"name3\",\n \"config\": \"string\",\n \"needUpdate\": true,\n \"rebuild\": true,\n \"ioFogNodeId\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"imageSnapshot\": \"string\",\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ]\n}\n"
"raw": "{\n \"name\": \"name3\",\n \"config\": \"string\",\n \"needUpdate\": true,\n \"rebuild\": true,\n \"iofogUuid\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"imageSnapshot\": \"string\",\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ]\n}\n"
},
"url": {
"raw": "{{host}}/api/v3/microservices/{{ms-id}}",
Expand Down Expand Up @@ -4074,7 +4074,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"name2\",\n \"config\": \"string\",\n \"catalogItemId\": {{item-id}},\n \"flowId\": {{flow-id}},\n \"ioFogNodeId\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ],\n \"ports\": [\n {\n \"internal\": 1,\n \"external\": 1,\n \"publicMode\": false\n }\n ],\n \"routes\": [\n ]\n}\n"
"raw": "{\n \"name\": \"name2\",\n \"config\": \"string\",\n \"catalogItemId\": {{item-id}},\n \"flowId\": {{flow-id}},\n \"iofogUuid\": \"{{node-id}}\",\n \"rootHostAccess\": true,\n \"logLimit\": 0,\n \"volumeMappings\": [\n {\n \"hostDestination\": \"/var/dest\",\n \"containerDestination\": \"/var/dest\",\n \"accessMode\": \"rw\"\n }\n ],\n \"ports\": [\n {\n \"internal\": 1,\n \"external\": 1,\n \"publicMode\": false\n }\n ],\n \"routes\": [\n ]\n}\n"
},
"url": {
"raw": "{{host}}/api/v3/microservices",
Expand Down