reitit icon indicating copy to clipboard operation
reitit copied to clipboard

Route data validation using malli

Open evaogbe opened this issue 1 year ago • 2 comments

Is it possible to validate route data using malli instead of spec? Since both malli and reitit are metosin libraries built on data-oriented concepts, it'd be nice to see them work together for validation of middleware or interceptors. If more libraries are fully compatible with malli, then it reduces the need for having the app schemas straddle spec alpha and malli. Is this a thing that already exists or could be added?

evaogbe avatar May 19 '24 19:05 evaogbe

not yet. should be. the original nudge to write malli was the limitations of spec for doing this. just needs to be done 🙂

ikitommi avatar Jun 04 '24 06:06 ikitommi

FWIW, we built our own Malli middleware/interceptor validation on top of reitit. It's totally worth it for the DX of having specific errors and auto generated documentation.

Ramblurr avatar May 12 '25 17:05 Ramblurr