When using createSchemaFactory from the @zenstackhq/zod package to generate Zod schemas for models that…
When using createSchemaFactory from the @zenstackhq/zod package to generate Zod schemas for models that…: a task in LegoFlow-SWE (Harbor dataset). The error reveals that the JsonArray constituent of the JsonValue union is a readonly array type, whereas the Zod‑inferred type expects a mutable array…
The task
The error reveals that the `JsonArray` constituent of the `JsonValue` union is a readonly array type, whereas the Zod‑inferred type expects a mutable array (`unknown[]`). Because the ORM returns plain mutable JavaScript arrays at runtime, this readonly modifier is purely a type‑level restriction that causes the…
Part of Lego-X/LegoFlow-SWE.