mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
21 lines
491 B
JavaScript
21 lines
491 B
JavaScript
const joi = require('joi');
|
|
const { featureShema } = require('../routes/admin-api/feature-schema');
|
|
const strategySchema = require('../routes/admin-api/strategy-schema');
|
|
|
|
// TODO: Extract to seperate file
|
|
const stateSchema = joi.object().keys({
|
|
version: joi.number(),
|
|
features: joi
|
|
.array()
|
|
.optional()
|
|
.items(featureShema),
|
|
strategies: joi
|
|
.array()
|
|
.optional()
|
|
.items(strategySchema),
|
|
});
|
|
|
|
module.exports = {
|
|
stateSchema,
|
|
};
|