Skip to content

Commit f8045bc

Browse files
authored
postman collection (#332)
1 parent ac2c2b8 commit f8045bc

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/schemas/microservice.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ const microserviceCreate = {
2323
"type": "array",
2424
"items": {"type": "string"}}
2525
},
26-
"required": ["name", "flowId", "catalogItemId"]
26+
"required": ["name", "flowId", "catalogItemId"],
27+
"additionalProperties": false
2728
};
2829

2930
const microserviceUpdate = {
@@ -43,7 +44,8 @@ const microserviceUpdate = {
4344
"type": "array",
4445
"items": {"$ref": "/volumeMappings"}
4546
}
46-
}
47+
},
48+
"additionalProperties": false
4749
};
4850

4951
const ports = {
@@ -54,7 +56,8 @@ const ports = {
5456
"external": {"type": "integer"},
5557
"publicMode": {"enum": [false]}
5658
},
57-
"required": ["internal", "external"]
59+
"required": ["internal", "external"],
60+
"additionalProperties": false
5861
};
5962

6063
const portsCreate = {
@@ -65,7 +68,8 @@ const portsCreate = {
6568
"external": {"type": "integer"},
6669
"publicMode": {"type": "boolean"}
6770
},
68-
"required": ["internal", "external"]
71+
"required": ["internal", "external"],
72+
"additionalProperties": false
6973
};
7074

7175
const volumeMappings = {
@@ -76,7 +80,8 @@ const volumeMappings = {
7680
"containerDestination": {"type": "string"},
7781
"accessMode": {"type": "string"}
7882
},
79-
"required": ["hostDestination", "containerDestination", "accessMode"]
83+
"required": ["hostDestination", "containerDestination", "accessMode"],
84+
"additionalProperties": false
8085
};
8186

8287
module.exports = {

tests/Controller Testing.postman_collection.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@
31373137
],
31383138
"body": {
31393139
"mode": "raw",
3140-
"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"
3140+
"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"
31413141
},
31423142
"url": {
31433143
"raw": "{{host}}/api/v3/microservices",
@@ -3287,7 +3287,7 @@
32873287
],
32883288
"body": {
32893289
"mode": "raw",
3290-
"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"
3290+
"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"
32913291
},
32923292
"url": {
32933293
"raw": "{{host}}/api/v3/microservices/{{ms-id}}",
@@ -4074,7 +4074,7 @@
40744074
],
40754075
"body": {
40764076
"mode": "raw",
4077-
"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"
4077+
"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"
40784078
},
40794079
"url": {
40804080
"raw": "{{host}}/api/v3/microservices",

0 commit comments

Comments
 (0)