Skip to content

Commit 6489e8a

Browse files
author
Yu Tang
committed
MAGETWO-28256: Bundle Integration API Refactoring
- Fixed REST API route
1 parent 4e118d2 commit 6489e8a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Bundle/etc/webapi.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<resource ref="Magento_Catalog::products"/>
1414
</resources>
1515
</route>
16-
<route url="/V1/bundle-products/:productSku/links" method="PUT">
16+
<route url="/V1/bundle-products/:productSku/links/:id" method="PUT">
1717
<service class="Magento\Bundle\Api\ProductLinkManagementInterface" method="saveChild"/>
1818
<resources>
1919
<resource ref="Magento_Catalog::products"/>

dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ public function testSaveChild()
111111
*/
112112
private function saveChild($productSku, $linkedProduct)
113113
{
114-
$resourcePath = self::RESOURCE_PATH . '/:productSku/links';
114+
$resourcePath = self::RESOURCE_PATH . '/:productSku/links/:id';
115115
$serviceInfo = [
116116
'rest' => [
117117
'resourcePath' => str_replace(
118-
[':productSku'],
119-
[$productSku],
118+
[':productSku', ':id'],
119+
[$productSku, $linkedProduct['id']],
120120
$resourcePath
121121
),
122122
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_PUT,

0 commit comments

Comments
 (0)