Skip to content

Commit

Permalink
Add schema.maybe() where it was missed
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed May 7, 2020
1 parent d230c17 commit 507a21b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { schema } from '@kbn/config-schema';
import { TypeOptions } from '@kbn/config-schema/target/types/types';

const stringOptionalNullable = schema.nullable(schema.string());
const stringOptionalNullable = schema.maybe(schema.nullable(schema.string()));

const stringRequired = schema.string();

Expand Down Expand Up @@ -62,7 +62,7 @@ const annotationsItems = schema.object({
});

const backgroundColorRulesItems = schema.object({
value: schema.nullable(schema.number()),
value: schema.maybe(schema.nullable(schema.number())),
id: stringOptionalNullable,
background_color: stringOptionalNullable,
color: stringOptionalNullable,
Expand Down Expand Up @@ -117,7 +117,7 @@ const metricsItems = schema.object({
),
type: stringRequired,
value: stringOptionalNullable,
values: schema.nullable(schema.arrayOf(schema.nullable(schema.string()))),
values: schema.maybe(schema.nullable(schema.arrayOf(schema.nullable(schema.string())))),
});

const splitFiltersItems = schema.object({
Expand Down Expand Up @@ -252,7 +252,7 @@ export const visPayloadSchema = schema.object({
})
),
// general
query: schema.maybe(schema.arrayOf(schema.nullable(queryObject))),
query: schema.nullable(schema.arrayOf(queryObject)),
state: schema.object({
sort: schema.maybe(
schema.object({
Expand Down

0 comments on commit 507a21b

Please sign in to comment.