Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue with fastify-autoload route prefixing #34

Open
alitnk opened this issue Jan 7, 2023 · 2 comments
Open

Compatibility issue with fastify-autoload route prefixing #34

alitnk opened this issue Jan 7, 2023 · 2 comments

Comments

@alitnk
Copy link

alitnk commented Jan 7, 2023

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
Copy link

Yeah and it doesn't even get the prefix defined in autoload. Absolute killer for me!

@nikeee
Copy link

nikeee commented May 15, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants