sebastianwessel / surrealdb-client-generator

Tool which generates a typescript client for SurrealDB and zod schema of a given database
MIT License
77 stars 12 forks source link

Add Zod passthrough if field is FLEXIBLE #10

Closed sebastianwessel closed 5 months ago

sebastianwessel commented 5 months ago

Currently, if no object keys are explicit set, it will default to z.object({}), which isn't allowing any unknown entries.

This is correct, if the field is not marked as FLEXIBLE, but not when it is explicit marked with FLEXIBLE