Skip to content

Commit 96bb665

Browse files
author
Cari Spruiell
committed
Merge branch 'MAGETWO-35288-Fix-REST-Api-Documentation' of github.scm.corp.ebay.com:magento-api/magento2ce into develop
2 parents 7679766 + 3f1e0f9 commit 96bb665

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<resource ref="Magento_Catalog::attributes_attributes" />
8383
</resources>
8484
</route>
85-
<route url="/V1/products/attributes/:attributeId" method="PUT">
85+
<route url="/V1/products/attributes/:attributeCode" method="PUT">
8686
<service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="save"/>
8787
<resources>
8888
<resource ref="Magento_Catalog::attributes_attributes" />

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeRepositoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testUpdate()
111111

112112
$attributeData = [
113113
'attribute' => [
114-
'attribute_code' => $attributeCode,
114+
'attribute_id' => $attribute['attribute_id'],
115115
'frontend_labels' => [
116116
['store_id' => 0, 'label' => 'front_lbl_new'],
117117
],
@@ -123,7 +123,7 @@ public function testUpdate()
123123

124124
$serviceInfo = [
125125
'rest' => [
126-
'resourcePath' => self::RESOURCE_PATH . '/' . $attribute['attribute_id'],
126+
'resourcePath' => self::RESOURCE_PATH . '/' . $attributeCode,
127127
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_PUT,
128128
],
129129
'soap' => [
@@ -134,7 +134,7 @@ public function testUpdate()
134134
];
135135

136136
if (TESTS_WEB_API_ADAPTER == self::ADAPTER_SOAP) {
137-
$attributeData['attribute']['attributeId'] = $attribute['attribute_id'];
137+
$attributeData['attribute']['attributeCode'] = $attributeCode;
138138
}
139139
$result = $this->_webApiCall($serviceInfo, $attributeData);
140140

0 commit comments

Comments
 (0)