mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
e3c9eaae3a
* feat: support filtering on project and environment fields for events Co-authored-by: Nuno Góis <github@nunogois.com>
19 lines
668 B
TypeScript
19 lines
668 B
TypeScript
import joi from 'joi';
|
|
import { nameType } from '../routes/util';
|
|
|
|
export const addonSchema = joi
|
|
.object()
|
|
.keys({
|
|
provider: nameType,
|
|
enabled: joi.bool().default(true),
|
|
description: joi.string().allow(null).allow('').optional(),
|
|
parameters: joi
|
|
.object()
|
|
.pattern(joi.string(), [joi.string(), joi.number(), joi.boolean()])
|
|
.optional(),
|
|
events: joi.array().optional().items(joi.string()),
|
|
projects: joi.array().optional().items(joi.string()),
|
|
environments: joi.array().optional().items(joi.string()),
|
|
})
|
|
.options({ allowUnknown: false, stripUnknown: true });
|