EllAchE

Results 14 comments of EllAchE

Updating on this - realizing what I want is aversion of safeParse that returns its best attempt at parsing the schema alongside the error. So even if there is a...

> Just making the fields optional and or nullable is not enough? > > Combined with a .passtrhough should be plenty. @m10rten thanks for the response! I'm happy to work...

> I suppose you could make a `warn` function that takes a zod schema and never errors, but that destroys your request, so the way I see it, this could...

> Zod would benefit from some concept of "error levels" and Zod 4 will likely include some concept of a "warning". > > ```ts > z.string().min(5, { level: 'warn' })...

@m10rten @colinhacks put together a draft PR as a starting point on a fork of the repo. https://github.com/EllAchE/zod/pull/2/files. Wanted to share for further discussion. Implementation here ^ just types the...

@ritz078 I can't make promises generally but I care about the json -> ts -> zod flow so happy to contribute & review to that path. Happy to talk here...

> @colinhacks I would like to share my thoughts too, because I really miss similar feature. > > If particular field is not crucial/required implies that it should be set...

> Hey! Thanks for the pull request! Heads up this is just a friendly notice to let you know I will be helping out with the project and reviewing approvals....

Traced the issue a little further and looks like this is just referencing the https://www.npmjs.com/package/json-schema-to-zod library. I'll leave the issue open as it still matters to have the UI but...

Went ahead and fixed this for myself, and will open a PR UPDATE - PR at https://github.com/ritz078/transform/pull/402