From 5baae329aa5616a248e567f0add86a4e9f6612b4 Mon Sep 17 00:00:00 2001 From: Evert De Spiegeleer Date: Fri, 11 Oct 2024 13:56:24 +0200 Subject: [PATCH] =?UTF-8?q?fix(output-validation):=20=F0=9F=90=9B=20return?= =?UTF-8?q?=20the=20untransformed=20response=20when=20no=20response=20vali?= =?UTF-8?q?dation=20schema=20has=20been=20provided?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/util/endpoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/util/endpoint.ts b/packages/core/src/util/endpoint.ts index 2af57fe..7634b77 100644 --- a/packages/core/src/util/endpoint.ts +++ b/packages/core/src/util/endpoint.ts @@ -279,7 +279,7 @@ export const endpointToExpressHandler = (endpoint: AnyEndpoint) => { .getHandler()?.(inputParams, req, res) .then((responseObj) => { // Output validation - let postOutputValidationResponseObj: z.output> | undefined + let postOutputValidationResponseObj: z.output> = responseObj try { postOutputValidationResponseObj = endpoint.getResponseValidationSchema()?.parse(responseObj) } catch (error) {