Skip to content

Commit a767745

Browse files
Use unrepresentable with zod toJSONSchema (#613)
1 parent 7f27343 commit a767745

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/restate-sdk-zod/src/serde_api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class ZodSerde<T extends z3.ZodTypeAny | z4.$ZodType>
3737

3838
constructor(private readonly schema: T) {
3939
if ("_zod" in schema) {
40-
this.jsonSchema = z4.toJSONSchema(schema);
40+
this.jsonSchema = z4.toJSONSchema(schema, {
41+
unrepresentable: "any",
42+
});
4143
} else if (schema instanceof z3.ZodType) {
4244
printZod3Warning();
4345
this.jsonSchema = undefined;

0 commit comments

Comments
 (0)