What is the better design practice?
If I have object A and it contains some related objects for example I have a car object and it\'s various types.
Should I on
I prefer the parameterless version of option 1, but I would favor something where the location of the type resource is returned, so that the client may choose whether or not to retrieve those resources.
Otherwise, we are not navigating the documents. Rather, we would be relying upon some out-of-band data, such as knowing the path to the type in advance.
{
"id": 1,
"name": "Some Car",
"types": [
{
"location": "api.example.org/type/1"
},
{
"location": "api.example.org/type/2"
}
]
}