diff --git a/lib/routes/client-api/metrics-schema.js b/lib/routes/client-api/metrics-schema.js index 12dedc6262..4c25ade26a 100644 --- a/lib/routes/client-api/metrics-schema.js +++ b/lib/routes/client-api/metrics-schema.js @@ -2,7 +2,7 @@ const joi = require('joi'); -const clientMetricsSchema = joi.object().keys({ +const clientMetricsSchema = joi.object().options({ stripUnknown: true }).keys({ appName: joi.string().required(), instanceId: joi.string().required(), bucket: joi.object().required().keys({ diff --git a/lib/routes/client-api/register-schema.js b/lib/routes/client-api/register-schema.js index e133e03598..99efd62488 100644 --- a/lib/routes/client-api/register-schema.js +++ b/lib/routes/client-api/register-schema.js @@ -2,7 +2,7 @@ const joi = require('joi'); -const clientRegisterSchema = joi.object().keys({ +const clientRegisterSchema = joi.object().options({ stripUnknown: true }).keys({ appName: joi.string().required(), instanceId: joi.string().required(), sdkVersion: joi.string().optional(),