-
Notifications
You must be signed in to change notification settings - Fork 373
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
[Bug?]: Route group with API does not work #1176
Comments
Hi @ryoid, I started to inspect this issue and have opened a pull request here to show what I believe the issue to be. @ryansolid could I be assigned this issue? Note: I am still in the process of testing/adding tests to the PR |
I stumbled upon the same issue yesterday and described it here on Discord. In the current implementation, it's expected that those grouping segments in API routes don't work, because they're just not handled at all. UI routes will replace any I only hope this is an overlook and not a design choice, since grouping adds as much convenience on API routes as it does with UI ones. |
Thanks @apademide for your detailed write up on discord! A replacement strategy similar to how UI routes implement it for groups would with consideration to maintaining the "scoring" order of routes to match. I can include this in my PR and also be sure to add documentation to make the expected behavior more clear. |
Thanks so much for your work @jzohdi this issue. PR is merged and will be released shortly. |
Duplicates
Latest version
Current behavior 😯
Creating route group with API Route returns 404.
Expected behavior 🤔
API route shout work
Steps to reproduce 🕹
Steps:
pnpm create solid
basic/routes/(group)/endpoint.tsx
http://localhost:3000/endpoint
, 404http://localhost:3000/page
, page in same route group displaysContext 🔦
Trying to group API routes that generate
sitemap.xml
androbots.txt
Reproduction
https://github.com/ryoid/solidstart-bug-grouped-api-route
Your environment 🌎
The text was updated successfully, but these errors were encountered: