From b3846446721bda90ba4f2b06dbbc6b7b67c9b0f7 Mon Sep 17 00:00:00 2001 From: varun Date: Wed, 8 Feb 2023 05:04:03 -0500 Subject: [PATCH] arrayb for capacity and type in tankers --- src/routes/createConnectionsRoute.js | 8 ++++---- src/routes/tankersRoute.js | 23 +++++++++++++++++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/routes/createConnectionsRoute.js b/src/routes/createConnectionsRoute.js index 09308a51..3d015b36 100644 --- a/src/routes/createConnectionsRoute.js +++ b/src/routes/createConnectionsRoute.js @@ -16,7 +16,7 @@ module.exports = function (fastify, opts, next) { source: { type: "string" }, inputConnections: { type: "array", - maxItems: 2, + maxItems: 2500, items: { type: "object", properties: { @@ -26,7 +26,7 @@ module.exports = function (fastify, opts, next) { }, outputConnections: { type: "array", - maxItems: 2, + maxItems: 2500, items: { type: "object", properties: { @@ -76,7 +76,7 @@ module.exports = function (fastify, opts, next) { source: { type: "string" }, inputConnections: { type: "array", - maxItems: 2, + maxItems: 2500, items: { type: "object", properties: { @@ -86,7 +86,7 @@ module.exports = function (fastify, opts, next) { }, outputConnections: { type: "array", - maxItems: 2, + maxItems: 2500, items: { type: "object", properties: { diff --git a/src/routes/tankersRoute.js b/src/routes/tankersRoute.js index 7b5a0eff..8d104783 100644 --- a/src/routes/tankersRoute.js +++ b/src/routes/tankersRoute.js @@ -28,8 +28,27 @@ module.exports = function (fastify, opts, next) { properties: { tankerName: { type: "string" }, phoneNumber: { type: "string"}, - typeofwater: { type: "string" }, - capacity: { type: "string" }, + typeofwater: { + type: "array", + maxItems: 2500, + items: { + type: "object", + properties: { + typeofwater: { type: "string", default: null }, + }, + }, + }, + capacity: { + type: "array", + maxItems: 2500, + items: { + type: "object", + properties: { + capacity: { type: "string", default: null }, + }, + }, + }, + }, }, security: [