Add schema

This commit is contained in:
wescoeur 2015-11-27 16:47:16 +01:00
parent f88c0b9b67
commit 74a31f3301

View File

@ -1,3 +1,55 @@
export const configurationSchema = {
type: 'object',
properties: {
transport: {
type: 'object',
properties: {
host: {
type: 'string',
description: 'host where the XMPP server is located'
},
port: {
type: 'number',
description: 'port of the XMPP server (default to 5222)'
},
user: {
type: 'string',
description: 'name to use to authenticate'
},
pass: {
type: 'string',
description: 'password to use to authenticate'
}
},
additionalProperties: false,
required: ['user', 'pass']
},
accountOptions: {
type: 'object',
properties: {
register: {
type: 'boolean',
description: 'create a new account if necessary',
default: true
}
},
additionalProperties: false,
required: ['register']
}
},
additionalProperties: false,
required: ['transport', 'accountOptions']
}
// ===================================================================
class TransportXmppPlugin {
constructor (xo) {