2018-12-19 10:36:56 +01:00
|
|
|
'use strict';
|
|
|
|
|
2020-01-02 19:23:52 +01:00
|
|
|
const joi = require('@hapi/joi');
|
2018-12-19 10:36:56 +01:00
|
|
|
const { nameType } = require('./util');
|
|
|
|
|
|
|
|
const applicationSchema = joi
|
|
|
|
.object()
|
|
|
|
.options({ stripUnknown: false })
|
|
|
|
.keys({
|
|
|
|
appName: nameType,
|
|
|
|
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;
|