Skip to content

Commit

Permalink
feat: Config - improve validation (use strict mode) (cube-js#6892)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr authored Sep 14, 2023
1 parent 0262d67 commit 5e39b9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/cubejs-server-core/src/core/optionsValidate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Joi from 'joi';
import DriverDependencies from './DriverDependencies';

const schemaQueueOptions = Joi.object().keys({
const schemaQueueOptions = Joi.object().strict(true).keys({
concurrency: Joi.number().min(1).integer(),
continueWaitTimeout: Joi.number().min(0).integer(),
executionTimeout: Joi.number().min(0).integer(),
Expand All @@ -11,7 +11,7 @@ const schemaQueueOptions = Joi.object().keys({
sendCancelMessageFn: Joi.func(),
});

const jwtOptions = Joi.object().keys({
const jwtOptions = Joi.object().strict(true).keys({
// JWK options
jwkRetry: Joi.number().min(1).max(5).integer(),
jwkDefaultExpire: Joi.number().min(0),
Expand Down Expand Up @@ -94,9 +94,9 @@ const schemaOptions = Joi.object().keys({
allowUngroupedWithoutPrimaryKey: Joi.boolean(),
orchestratorOptions: Joi.alternatives().try(
Joi.func(),
Joi.object().keys({
Joi.object().strict(true).keys({
redisPrefix: Joi.string().allow(''),
redisPoolOptions: Joi.object().keys({
redisPoolOptions: Joi.object().strict(true).keys({
poolMin: Joi.number().min(0),
poolMax: Joi.number().min(0),
idleTimeoutSeconds: Joi.number().min(0),
Expand Down

0 comments on commit 5e39b9b

Please sign in to comment.