typicode / jsonplaceholder

A simple online fake REST API server
https://jsonplaceholder.typicode.com
MIT License
5.05k stars 582 forks source link

json server using _embed returns an empty array when accessing children #176

Open Fighteros opened 3 years ago

Fighteros commented 3 years ago

json server using _embed returns an empty array

my db file

{ "id": 2, "companyName": "Coffee Mockal", "employees": [ { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" } ] }

when i try http://localhost:5000/companies/2?_embed=employees

the server responds with an empty array