From d81de7755f9219d9556017c2f35bff02828f16d8 Mon Sep 17 00:00:00 2001 From: Pankov Date: Thu, 8 Nov 2018 16:29:58 +0300 Subject: [PATCH] postman collection --- src/schemas/microservice.js | 15 ++++++++++----- tests/Controller Testing.postman_collection.json | 6 +++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/schemas/microservice.js b/src/schemas/microservice.js index 29a1e6239..833e20a2f 100644 --- a/src/schemas/microservice.js +++ b/src/schemas/microservice.js @@ -23,7 +23,8 @@ const microserviceCreate = { "type": "array", "items": {"type": "string"}} }, - "required": ["name", "flowId", "catalogItemId"] + "required": ["name", "flowId", "catalogItemId"], + "additionalProperties": false }; const microserviceUpdate = { @@ -43,7 +44,8 @@ const microserviceUpdate = { "type": "array", "items": {"$ref": "/volumeMappings"} } - } + }, + "additionalProperties": false }; const ports = { @@ -54,7 +56,8 @@ const ports = { "external": {"type": "integer"}, "publicMode": {"enum": [false]} }, - "required": ["internal", "external"] + "required": ["internal", "external"], + "additionalProperties": false }; const portsCreate = { @@ -65,7 +68,8 @@ const portsCreate = { "external": {"type": "integer"}, "publicMode": {"type": "boolean"} }, - "required": ["internal", "external"] + "required": ["internal", "external"], + "additionalProperties": false }; const volumeMappings = { @@ -76,7 +80,8 @@ const volumeMappings = { "containerDestination": {"type": "string"}, "accessMode": {"type": "string"} }, - "required": ["hostDestination", "containerDestination", "accessMode"] + "required": ["hostDestination", "containerDestination", "accessMode"], + "additionalProperties": false }; module.exports = { diff --git a/tests/Controller Testing.postman_collection.json b/tests/Controller Testing.postman_collection.json index 6a6fe0b9e..15a288151 100644 --- a/tests/Controller Testing.postman_collection.json +++ b/tests/Controller Testing.postman_collection.json @@ -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", @@ -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}}", @@ -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",