-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Allow the use of nested resource key #47
Comments
Hi Ingro, always happy to know my projects are appreciated, thanks :) Not really sure to undersdand your example, because I don't see |
Oh I think I'm getting it. When you get {
"data": [
{
"id": 1,
"name": "John"
},
// ... And because user list is in |
Yeah sorry it wasn't clear on the first thought, that was the response I expect from the server. I need the Completely out of scope but, great avatar choice! :) |
Thanks, good choice for Radiohead :) Unfortunately, I don't see a way to use that kind of structure with this project. It would mean creating some all new routes. The current approach in JSON Server for pagination, is to use Sorry about that. Maybe you can have a look at dyson or interfake. Also, I think it wouldn't take too long to create a custom fake server using Express. Actually, if you look at Hope it will help. |
Well thanks for your suggestions, I will look at the resources you linked me, I think you can close this issue, keep up the good work! :D |
Hello and thanks for your great work!
I have a little problem. We use a structure like this:
Now I can write the structure in my generate.js with the "data" and "meta" keys and it return correctly when I call /user.
Anyway when I try to get a single element of the collection, say /user/1, it returns me an empty object with a 404 http code.
I understand that this is a non-conventional request, but do you think that a situation like that could be handled via some config file or options passed to the CLI?
Thank you.
The text was updated successfully, but these errors were encountered: