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 table is SCHEMALESS #9

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 table is SCHEMAFULL, but not when set to SCHEMALESS.