2016-12-12 21:44:21 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const joi = require('joi');
|
|
|
|
|
|
|
|
const strategySchema = joi.object().keys({
|
2017-06-28 10:20:22 +02:00
|
|
|
name: joi.string().regex(/^[a-zA-Z0-9\\.\\-]{3,100}$/).required(),
|
2017-06-28 21:10:43 +02:00
|
|
|
editable: joi.boolean().default(true),
|
2016-12-12 21:44:21 +01:00
|
|
|
description: joi.string(),
|
2017-06-28 10:20:22 +02:00
|
|
|
parameters: joi.array().required().items(
|
|
|
|
joi.object().keys({
|
2016-12-12 21:44:21 +01:00
|
|
|
name: joi.string().required(),
|
|
|
|
type: joi.string().required(),
|
2016-12-17 16:47:52 +01:00
|
|
|
description: joi.string().allow(''),
|
2016-12-12 21:44:21 +01:00
|
|
|
required: joi.boolean(),
|
2017-06-28 10:20:22 +02:00
|
|
|
})
|
|
|
|
),
|
2016-12-12 21:44:21 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = strategySchema;
|