Compatibility issue with fastify-autoload route prefixing
alitnk opened this issue · 2 comments
alitnk commented
fastify-autoload handles adding route prefix for the loaded plugins, but it doesn't work when it's used with this library.
For example, say the loaded plugin is in routes/auth/index.js
:
fastify.get('/login', ...)
will turn into /auth/login
but
fastify.zod.get('/login', ...)
does not get prefixed.
r0mankon commented
Yeah and it doesn't even get the prefix
defined in autoload. Absolute killer for me!
nikeee commented
I just tried played around by migrating my server to this and encountered this issue. This basically makes it implossible for me to adopt fastify-zod (getting FST_ERR_DUPLICATED_ROUTE
due to this).