Skip to content

Commit

Permalink
Merge pull request #927 from SchumacherFM/catalogWebApiRouteRenameGet
Browse files Browse the repository at this point in the history
GET: Unifying REST API searches with the interface method getList() (MAGETWO-32464)
  • Loading branch information
vpelipenko committed Jan 12, 2015
2 parents a1ab120 + 20ffc3f commit a4cd98b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 26 deletions.
10 changes: 5 additions & 5 deletions app/code/Magento/Catalog/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<resource ref="Magento_Catalog::products" />
</resources>
</route>
<route url="/V1/products" method="PUT">
<route url="/V1/products" method="GET">
<service class="Magento\Catalog\Api\ProductRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::products" />
Expand All @@ -51,7 +51,7 @@
<resource ref="Magento_Catalog::attributes_attributes" />
</resources>
</route>
<route url="/V1/products/attributes" method="PUT">
<route url="/V1/products/attributes" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="getList" />
<resources>
<resource ref="Magento_Catalog::attributes_attributes" />
Expand All @@ -63,7 +63,7 @@
<resource ref="Magento_Catalog::attributes_attributes" />
</resources>
</route>
<route url="/V1/categories/attributes" method="PUT">
<route url="/V1/categories/attributes" method="GET">
<service class="Magento\Catalog\Api\CategoryAttributeRepositoryInterface" method="getList" />
<resources>
<resource ref="Magento_Catalog::attributes_attributes" />
Expand Down Expand Up @@ -99,7 +99,7 @@
<resource ref="Magento_Catalog::products"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/sets/list" method="PUT">
<route url="/V1/products/attribute-sets/sets/list" method="GET">
<service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
Expand Down Expand Up @@ -147,7 +147,7 @@
<resource ref="Magento_Catalog::sets"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/groups/list" method="PUT">
<route url="/V1/products/attribute-sets/groups/list" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
Expand Down
12 changes: 0 additions & 12 deletions app/code/Magento/Customer/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
<resource ref="Magento_Customer::group"/>
</resources>
</route>
<route url="/V1/customerGroups/search" method="POST">
<service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Customer::group"/>
</resources>
</route>
<route url="/V1/customerGroups/search" method="GET">
<service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/>
<resources>
Expand Down Expand Up @@ -160,12 +154,6 @@
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
<route url="/V1/customers/search" method="POST">
<service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Customer::customer"/>
</resources>
</route>
<route url="/V1/customers/search" method="GET">
<service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getList"/>
<resources>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Eav/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd">
<route url="/V1/eav/attribute-sets/list" method="PUT">
<route url="/V1/eav/attribute-sets/list" method="GET">
<service class="Magento\Eav\Api\AttributeSetRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
Expand Down
10 changes: 5 additions & 5 deletions app/code/Magento/Sales/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<resource ref="Magento_Sales::sales" />
</resources>
</route>
<route url="/V1/orders" method="PUT">
<route url="/V1/orders" method="GET">
<service class="Magento\Sales\Api\OrderRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
Expand Down Expand Up @@ -78,7 +78,7 @@
<resource ref="Magento_Sales::sales" />
</resources>
</route>
<route url="/V1/invoices" method="PUT">
<route url="/V1/invoices" method="GET">
<service class="Magento\Sales\Api\InvoiceRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
Expand Down Expand Up @@ -126,7 +126,7 @@
<resource ref="Magento_Sales::sales" />
</resources>
</route>
<route url="/V1/creditmemos" method="PUT">
<route url="/V1/creditmemos" method="GET">
<service class="Magento\Sales\Api\CreditmemoRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
Expand Down Expand Up @@ -168,7 +168,7 @@
<resource ref="Magento_Sales::sales" />
</resources>
</route>
<route url="/V1/shipments" method="PUT">
<route url="/V1/shipments" method="GET">
<service class="Magento\Sales\Api\ShipmentRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
Expand Down Expand Up @@ -228,7 +228,7 @@
<resource ref="Magento_Sales::sales" />
</resources>
</route>
<route url="/V1/transactions" method="PUT">
<route url="/V1/transactions" method="GET">
<service class="Magento\Sales\Api\TransactionRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Tax/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<resource ref="Magento_Tax::manage_tax"/>
</resources>
</route>
<route url="/V1/taxRate/search" method="PUT">
<route url="/V1/taxRate/search" method="GET">
<service class="Magento\Tax\Api\TaxRateRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Tax::manage_tax"/>
Expand Down Expand Up @@ -60,7 +60,7 @@
<resource ref="Magento_Tax::manage_tax"/>
</resources>
</route>
<route url="/V1/taxRules/search" method="PUT">
<route url="/V1/taxRules/search" method="GET">
<service class="Magento\Tax\Api\TaxRuleRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Tax::manage_tax"/>
Expand Down Expand Up @@ -90,7 +90,7 @@
<resource ref="Magento_Tax::manage_tax"/>
</resources>
</route>
<route url="/V1/taxClass/search" method="PUT">
<route url="/V1/taxClass/search" method="GET">
<service class="Magento\Tax\Api\TaxClassRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Tax::manage_tax"/>
Expand Down

0 comments on commit a4cd98b

Please sign in to comment.