chanfana icon indicating copy to clipboard operation
chanfana copied to clipboard

Zod v4 support

Open searledan opened this issue 5 months ago • 5 comments

I tried upgrading to the latest version of Zod v4 (4.0.8) and was thrown errors around the schema property not matching types.

Is the latest version of Zod supported?

searledan avatar Jul 24 '25 08:07 searledan

Hey @searledan this will be available on chanfana 3.0.0 soon

G4brym avatar Jul 24 '25 20:07 G4brym

Will the zod v4 support still rely on zod-to-openapi or would this be a good opportunity to assess a switch to https://github.com/samchungy/zod-openapi as well? It's making much better use of the new zod v4 features like native registries and json schema support.

marcomuser avatar Aug 21 '25 20:08 marcomuser

Hey @searledan this will be available on chanfana 3.0.0 soon

Hi, wonder know when will chanfana 3.0.0 come out.

zzx58-027 avatar Aug 28 '25 11:08 zzx58-027

Hey @searledan this will be available on chanfana 3.0.0 soon

Hi, wonder know when will chanfana 3.0.0 come out.

soon™

ToshY avatar Sep 12 '25 21:09 ToshY

This is now available for testing thanks to @ndisidore right now is up for testing using this command: npm i https://pkg.pr.new/cloudflare/chanfana@next

Here are some notes on what changed: https://github.com/cloudflare/chanfana/blob/next/docs/migration-zod-v4.md

An official version for this will be released once we find it stable Please report any issues you might find Thanks

G4brym avatar Nov 06 '25 18:11 G4brym