typera icon indicating copy to clipboard operation
typera copied to clipboard

Plugin proposal : typera-zod

Open cyrilchapon opened this issue 2 years ago • 3 comments

Hey !

I wrote a kind of plugin : an alternative request parser with the excellent library zod.

Here it is => typera-zod.

Motivations : I rewrite — literally like every week — some kind of "validated endpoint creators" for express; I'm tired of it and found Typera several months ago to make that work. I now had a chance to give it a shot. Though, I'm not that familiar with io-ts and I already am in love with Zod. So, I gave an attempt to marry each other.

Any thoughts ? 🙂

cyrilchapon avatar Mar 15 '23 00:03 cyrilchapon

Looks great! This definitely needs to be mentioned in typera’s README and docs. Have you tried whether typera-openapi also works with your lib?

akheron avatar Mar 16 '23 19:03 akheron

@akheron thanks 🙂

Have you tried whether typera-openapi also works with your lib? Nope, this could be a next step but I tend to prefer not-hard-generating-solutions for this (just dynamic OpenAPI schemas within the code).

I can have a look though.

cyrilchapon avatar Mar 16 '23 22:03 cyrilchapon

Ok so I made a test (sorry for delay, I have to do a massive refactor due to #708).

It's not working for now, leaving an issue there.

cyrilchapon avatar Apr 24 '23 15:04 cyrilchapon