From 97e0a983f1c91067b053f03ab8ba257e32f7112d Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Wed, 25 Nov 2015 14:19:41 +0100 Subject: [PATCH] Fix schema. --- .../xo-server-transport-email/src/index.js | 52 ++++++++++++------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/packages/xo-server-transport-email/src/index.js b/packages/xo-server-transport-email/src/index.js index 4fc3049b0..5574d209e 100644 --- a/packages/xo-server-transport-email/src/index.js +++ b/packages/xo-server-transport-email/src/index.js @@ -24,12 +24,13 @@ export const configurationSchema = { } }, - additionalProperties: true, + additionalProperties: false, required: ['address'] }, transport: { type: 'object', + properties: { host: { type: 'string', @@ -43,30 +44,43 @@ export const configurationSchema = { type: 'boolean', description: 'whether the connection should use SSL' }, - auth: { - type: 'object', - properties: { - user: { - type: 'string', - description: 'name to use to authenticate' - }, - pass: { - type: 'string', - description: 'password to use to authenticate' - } - }, - additionalProperties: true, - required: ['user', 'pass'] + // FIXME: xo-web does not support edition of too nested + user: { + type: 'string', + description: 'name to use to authenticate' }, + pass: { + type: 'string', + description: 'password to use to authenticate' + } + // properties. + // auth: { + // type: 'object', - additionalProperties: true - } + // properties: { + // user: { + // type: 'string', + // description: 'name to use to authenticate' + // }, + // pass: { + // type: 'string', + // description: 'password to use to authenticate' + // } + // }, + + // additionalProperties: false, + // required: ['user', 'pass'] + // } + }, + + additionalProperties: false, + required: ['host', 'user', 'pass'] } }, - additionalProperties: true, - required: ['host', 'auth'] + additionalProperties: false, + required: ['transport'] } // ===================================================================