Skip to content

Commit

Permalink
add validation support for legacy filter values
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Feb 25, 2020
1 parent a60b25f commit f1c83bf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,13 @@ const seriesItems = Joi.object({
)
.optional(),
fill: numberOptionalOrEmptyString,
filter: Joi.object({
query: stringRequired,
language: stringOptionalNullable,
}).optional(),
filter: Joi.alternatives(
Joi.object({
query: stringRequired,
language: stringOptionalNullable,
}).optional(),
Joi.string().valid('')
),
formatter: stringRequired,
hide_in_legend: numberIntegerOptional,
hidden: Joi.boolean().optional(),
Expand Down

0 comments on commit f1c83bf

Please sign in to comment.