I tried to reproduce the following locally: https://github.com/typicode/json-server/issues/167
I copied the route to my routes.json:
"/Data/Items/:itemId/Document/:id.json": "/Document/:id"
I then added Document to my db.js file in my js function that returns JSON.
"document": [
{
"id": 346,
"itemId": 42,
"foo": "bar",
"body": "some data"
}
]
Navigating to the /document route works, the rewritten route does not.
This is the route I tried to hit: /Data/Items/3/Document/2.json
I forgot to mention I'm running [email protected]
I've noticed the same thing, and also that filters such as the below don't work:
'/v1/accounts/:account_id/resource': '/resource?account_id=:account_id'
I am also having the routes not filtering the results issue.
The following routes.json is not retuning the filtered result
{
"/data/StandardList" : "/StandardList?_start=0&_end=3"
}
I am also having the same issue. Seems related to another issue too. I think its any kind of property used in the url that isn't :id.
Most helpful comment
I've noticed the same thing, and also that filters such as the below don't work: