You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I embed a HalCollection in another HalResource the attributes are not rendered in the Json result. This seems wrong to me since those are first-class properties of the resource. They are part of the resource collection definition.
The text was updated successfully, but these errors were encountered:
A solution would be to provide the user in the config file of PhlyRestfully an option/choice how to render embedded collections. The whole collection resource (including the collection attributes and _links) or only the extracted array of items from the collection resource.
The difference lies here: https://github.com/phly/PhlyRestfully/blob/master/src/PhlyRestfully/Plugin/HalLinks.php#L765
In the first case (embedding the whole collection) the function line 765 should be renderCollection, in the second case the function on line 765 should be extractCollection. Both solutions render a correct result which is fully compliant to the HAL specs. It just allows the user a choice how to embed his collections. It also solves another problem I ran into while using the module which I mentioned here: http://stackoverflow.com/questions/19400784/no-self-href-in-embedded-hal-resource-collection
If I embed a
HalCollection
in anotherHalResource
the attributes are not rendered in the Json result. This seems wrong to me since those are first-class properties of the resource. They are part of the resource collection definition.The text was updated successfully, but these errors were encountered: