diff --git a/package.json b/package.json index a5822de..7564fdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lambda-feedback-segp-sandbox/ef-test-server", - "version": "0.4.0", + "version": "0.5.0", "main": "dist/index.js", "scripts": { "build": "yarn tsc", diff --git a/src/schema.ts b/src/schema.ts index b4234a7..eaf1126 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -2,8 +2,12 @@ import { z } from 'zod' export const EvaluationFunctionRequestData = z .object({ - answer: z.string(), - response: z.string(), + answer: z.union([z.string(), z.array(z.any()), z.object({}).passthrough()]), + response: z.union([ + z.string(), + z.array(z.any()), + z.object({}).passthrough(), + ]), params: z.record(z.string(), z.any()), }) .strict()