1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/lib/services/client-metrics/metrics-schema.js

34 lines
751 B
JavaScript
Raw Normal View History

'use strict';
2020-07-31 22:15:09 +02:00
const joi = require('joi');
const applicationSchema = joi
.object()
.options({ stripUnknown: false })
.keys({
appName: joi.string().required(),
sdkVersion: joi.string().optional(),
strategies: joi
.array()
.optional()
.items(joi.string(), joi.any().strip()),
description: joi
.string()
.allow('')
.optional(),
url: joi
.string()
.allow('')
.optional(),
color: joi
.string()
.allow('')
.optional(),
icon: joi
.string()
.allow('')
.optional(),
});
module.exports = applicationSchema;