From 7142688a770f53ee332129575cc3570eff7a68a3 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Tue, 24 Mar 2026 17:01:56 -0300 Subject: [PATCH] fix(types): Zod 4 z.record 2-arg form + header type cast in openapi/try --- src/app/api/openapi/try/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/openapi/try/route.ts b/src/app/api/openapi/try/route.ts index 091aa26a6c..1300aa6daa 100644 --- a/src/app/api/openapi/try/route.ts +++ b/src/app/api/openapi/try/route.ts @@ -10,7 +10,7 @@ import { validateBody, isValidationFailure } from "@/shared/validation/helpers"; const tryRequestSchema = z.object({ method: z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]).optional().default("GET"), path: z.string().min(1, "Path is required").startsWith("/", "Path must start with /"), - headers: z.record(z.string()).optional().default({}), + headers: z.record(z.string(), z.string()).optional().default({}), body: z.any().optional(), }); @@ -35,7 +35,7 @@ export async function POST(request: NextRequest) { // Forward cookies/auth from the original request const forwardHeaders: Record = { - ...headers, + ...(headers as Record), }; // Forward auth from the dashboard session