2018-12-19 10:36:56 +01:00
|
|
|
'use strict';
|
|
|
|
|
2020-07-31 22:15:09 +02:00
|
|
|
const joi = require('joi');
|
2018-12-19 10:36:56 +01:00
|
|
|
|
|
|
|
const applicationSchema = joi
|
|
|
|
.object()
|
|
|
|
.options({ stripUnknown: false })
|
|
|
|
.keys({
|
2020-11-03 15:15:16 +01:00
|
|
|
appName: joi.string().required(),
|
2018-12-19 10:36:56 +01:00
|
|
|
sdkVersion: joi.string().optional(),
|
|
|
|
strategies: joi
|
|
|
|
.array()
|
2019-05-10 13:47:56 +02:00
|
|
|
.optional()
|
2018-12-19 10:36:56 +01:00
|
|
|
.items(joi.string(), joi.any().strip()),
|
2019-05-10 13:47:56 +02:00
|
|
|
description: joi
|
|
|
|
.string()
|
|
|
|
.allow('')
|
|
|
|
.optional(),
|
|
|
|
url: joi
|
|
|
|
.string()
|
|
|
|
.allow('')
|
|
|
|
.optional(),
|
|
|
|
color: joi
|
|
|
|
.string()
|
|
|
|
.allow('')
|
|
|
|
.optional(),
|
|
|
|
icon: joi
|
|
|
|
.string()
|
|
|
|
.allow('')
|
|
|
|
.optional(),
|
2018-12-19 10:36:56 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = applicationSchema;
|