Is it correct to implement one REST endpoint (GET) to expose parent and set of child objects together?
e.g:
parent { name: parent, id: 123, Children:{ { childName:1 }, { childName:2 } } }
I am thinking two approaches:
- Implement one API named "parentWithchildren" (GET: /parentWithchildren/)
- Just endpoint for parent, and it will return a Parent object with set of child objects (GET: parent/)