-
-
Notifications
You must be signed in to change notification settings - Fork 923
Closed
Labels
Milestone
Description
When serializing trees with groups such as the following, it is convenient to be able to configure the Serialization depth:
class TreeEntry
{
/**
* @var TreeEntry
* @Groups{"a"}
*/
public $parent;
}
A new @Depth(n)
where N is the maximum depth level to normalize can be useful for such use case. When n
is reached, the normalizer will output the IRI of the resource instead of embedding it. Proposal:
class TreeEntry
{
/**
* @var TreeEntry
* @Groups{"a"}
* @Depth(2)
*/
public $parent;
}