This commit is contained in:
parent
46bb78ec3e
commit
15ea696531
1 changed files with 14 additions and 4 deletions
|
@ -32,11 +32,11 @@ const numberIntegerRequired = Joi.number()
|
|||
.integer()
|
||||
.required();
|
||||
const numberOptional = Joi.number().optional();
|
||||
const numberRequired = Joi.number().required();
|
||||
const queryObject = Joi.object({
|
||||
language: Joi.string().allow(''),
|
||||
query: Joi.string().allow(''),
|
||||
});
|
||||
const numberOptionalOrEmptyString = Joi.alternatives(numberOptional, Joi.string().valid(''));
|
||||
|
||||
const annotationsItems = Joi.object({
|
||||
color: stringOptionalNullable,
|
||||
|
@ -74,6 +74,16 @@ const metricsItems = Joi.object({
|
|||
numerator: stringOptionalNullable,
|
||||
denominator: stringOptionalNullable,
|
||||
sigma: stringOptionalNullable,
|
||||
unit: stringOptionalNullable,
|
||||
model_type: stringOptionalNullable,
|
||||
mode: stringOptionalNullable,
|
||||
lag: numberOptional,
|
||||
alpha: numberOptional,
|
||||
beta: numberOptional,
|
||||
gamma: numberOptional,
|
||||
period: numberOptional,
|
||||
multiplicative: Joi.boolean(),
|
||||
window: numberOptional,
|
||||
function: stringOptionalNullable,
|
||||
script: stringOptionalNullable,
|
||||
variables: Joi.array()
|
||||
|
@ -121,7 +131,7 @@ const seriesItems = Joi.object({
|
|||
})
|
||||
)
|
||||
.optional(),
|
||||
fill: numberOptional,
|
||||
fill: numberOptionalOrEmptyString,
|
||||
filter: Joi.object({
|
||||
query: stringRequired,
|
||||
language: stringOptionalNullable,
|
||||
|
@ -131,11 +141,11 @@ const seriesItems = Joi.object({
|
|||
hidden: Joi.boolean().optional(),
|
||||
id: stringRequired,
|
||||
label: stringOptionalNullable,
|
||||
line_width: numberOptional,
|
||||
line_width: numberOptionalOrEmptyString,
|
||||
metrics: Joi.array().items(metricsItems),
|
||||
offset_time: stringOptionalNullable,
|
||||
override_index_pattern: numberOptional,
|
||||
point_size: numberRequired,
|
||||
point_size: numberOptionalOrEmptyString,
|
||||
separate_axis: numberIntegerOptional,
|
||||
seperate_axis: numberIntegerOptional,
|
||||
series_index_pattern: stringOptionalNullable,
|
||||
|
|
Loading…
Reference in a new issue