From d0ed241321883c300d4cb3107b0a9326be2a8ef0 Mon Sep 17 00:00:00 2001 From: Nicolas Froidure Date: Fri, 29 Sep 2023 16:49:38 +0200 Subject: [PATCH] chore(ajv): fix ajv settings to avoid type coercition Type coercition is no longer necessary since parameters casting is done everywhere (see https://github.com/nfroidure/whook/blob/5c171f7d214529bc2eb641c2ae87321174f51824/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts#L348) --- packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts | 2 -- .../src/wrappers/wrapHandlerForGoogleHTTPFunction.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts b/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts index 28323e17..caa46ffd 100644 --- a/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts +++ b/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts @@ -166,8 +166,6 @@ async function initWrapHandlerForConsumerLambda({ warn: (...args: string[]) => log('warning', ...args), error: (...args: string[]) => log('error', ...args), }, - useDefaults: true, - coerceTypes: true, }); addAJVFormats.default(ajv); const ammendedParameters = extractOperationSecurityParameters( diff --git a/packages/whook-gcp-functions/src/wrappers/wrapHandlerForGoogleHTTPFunction.ts b/packages/whook-gcp-functions/src/wrappers/wrapHandlerForGoogleHTTPFunction.ts index d87cfa3c..e6da3d25 100644 --- a/packages/whook-gcp-functions/src/wrappers/wrapHandlerForGoogleHTTPFunction.ts +++ b/packages/whook-gcp-functions/src/wrappers/wrapHandlerForGoogleHTTPFunction.ts @@ -144,8 +144,6 @@ async function initWrapHandlerForGoogleHTTPFunction({ warn: (...args: string[]) => log?.('warning', ...args), error: (...args: string[]) => log?.('error', ...args), }, - useDefaults: true, - coerceTypes: true, }); addAJVFormats.default(ajv); const ammendedParameters = extractOperationSecurityParameters(