-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
autoPrefix overwrites directory path set by dirNameRoutePrefix #205
Comments
Sorry for the radio silence. It seems no one is available to triage this. I'm going to tag this as "good first issue" to give some visibility. (I encourage you to experiment and look into the code). |
Chiming in because I'm interested in 'fixing' this, but it seems like a considerable breaking change. The document is correct: when set, the prefix option passed to I took a crack at it, but some tests are failing and I don't understand what the expected behavior will always be: https://github.com/fastify/fastify-autoload/pull/214/files. |
Any update on this? |
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Would we be able to solve this while avoiding a breaking change by introducing a new option like |
Prerequisites
Issue
Hi,
Using the example from README
Say
new-routes.js
has a route withfastify.patch('/entity', ...
That is available at
http://.../hooked-plugin/children/entity
, as by defaultdirNameRoutePrefix
is set. So far so good.In
new-routes.js
, I've setI would have expected the route to be now at
http://.../hooked-plugin/children/batch/entity
but instead is athttp://.../hooked-plugin/batch/entity
If this is intended behavior, would you please mention in README for
autoPrefix
that it overwrites, not appends, to folder structure path?This isn't consistent with
When setting both options.prefix and plugin.autoPrefix they will be concatenated.
, but at least it's documented.Thanks!
The text was updated successfully, but these errors were encountered: