You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. sadly this is a limitation of route matcher algorithm in nitro v2 (radix3). in nitro v3, we use new implementation (rou3) which should handle this well. i will try to test it in a local app but you can also directly test nitro v3 via nightly channel.
Environment
Reproduction
https://stackblitz.com/edit/github-xqvnbx?file=server%2Froutes%2Findex.ts
Describe the bug
What I am trying to achieve is the following:
The use case is to create a simple CRUD API for each table of a database, e.g.:
GET /api/foo
->/api/[table]/index.get.ts
POST /api/foo
->/api/[table]/index.post.ts
GET /api/foo/1
->/api/[table]/[id].get.ts
PATCH /api/foo/1
->/api/[table]/[id].patch.ts
DELETE /api/foo/1
->/api/[table]/[id].delete.ts
while preserving the ability to override a specific endpoint for a table that requires specific handling, e.g.:
GET /api/bar
->/api/bar/index.get.ts
In doing so, I would expect
PATCH /api/bar/1
to still work but it seems that Nitro will discard any/api/bar/*
endpoints after creating that file.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: