Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions features/hal/hal.feature
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,19 @@ Feature: HAL support
},
"thirdLevel": {
"href": "/third_levels/1"
},
"parent": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be relationEmbedder isn't it?

"href": "\/relation_embedders\/1"
}
},
"_embedded": {
"thirdLevel": {
"_links": {
"self": {
"href": "/third_levels/1"
},
"parent": {
"href": "\/related_dummies\/1"
}
},
"level": 3
Expand Down
2 changes: 2 additions & 0 deletions src/Hal/Serializer/ItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ private function populateRelation(array $data, $object, ?string $format, array $
continue;
}

$attributeValue['_links']['parent']['href'] = $this->getRelationIri($data);

$data[$key][$relationName] = $attributeValue;
continue;
}
Expand Down