ProNextJS / declarative-routing

NextJS Typesafe Routing System
MIT License
217 stars 17 forks source link

[Discussion] Support for other validation libraries ? #6

Open ecyrbe opened 2 months ago

ecyrbe commented 2 months ago

Hello Jack,

Would it be welcomed to have contributions to add support for other libraries like valibot, @effect/schema, typebox etc ? It would allow to have smaller footprint for SPA and not be forced into using zod.

I have not looked to much into the code, but it looks like it's using inlined string to generate the routes validation code. So maybe it would imply using a more complex template system with some kind of user plugins for other esotheric validation libraries.

But before proposing any PR, i want to check if you want this or not.

jherr commented 2 months ago

As a replacement option for Zod? Sure. Ideally we could offer a list of possible options to choose from during initial setup, where the setting is also serialized in the config.