Skip to content

Commit

Permalink
Merge pull request #64 from magento-api/API-Sprint41-Bugs
Browse files Browse the repository at this point in the history
[API] - Sprint 41 Bugs
  • Loading branch information
Alexander Paliarush committed Jan 29, 2015
2 parents f94717b + f212d65 commit 1afbe7e
Show file tree
Hide file tree
Showing 32 changed files with 642 additions and 275 deletions.
44 changes: 22 additions & 22 deletions app/code/Magento/Catalog/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<route url="/V1/products" method="GET">
<service class="Magento\Catalog\Api\ProductRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/products/:productSku" method="GET">
<service class="Magento\Catalog\Api\ProductRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>

Expand All @@ -49,7 +49,7 @@
<route url="/V1/products/attributes/:attributeCode" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::attributes_attributes" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/products/attributes" method="GET">
Expand Down Expand Up @@ -97,19 +97,19 @@
<route url="/V1/products/types" method="GET">
<service class="Magento\Catalog\Api\ProductTypeListInterface" method="getProductTypes"/>
<resources>
<resource ref="Magento_Catalog::products"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/sets/list" method="GET">
<service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/:attributeSetId" method="GET">
<service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/:attributeSetId" method="DELETE">
Expand All @@ -133,7 +133,7 @@
<route url="/V1/products/attribute-sets/:attributeSetId/attributes" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeManagementInterface" method="getAttributes"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/attributes" method="POST">
Expand All @@ -151,7 +151,7 @@
<route url="/V1/products/attribute-sets/groups/list" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::sets"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/attribute-sets/groups" method="POST">
Expand All @@ -175,7 +175,7 @@
<route url="/V1/products/attributes/:attributeCode/options" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" method="getItems"/>
<resources>
<resource ref="Magento_Catalog::attributes_attributes" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/products/attributes/:attributeCode/options" method="POST">
Expand All @@ -193,13 +193,13 @@
<route url="/V1/products/media/types/:attributeSetName" method="GET">
<service class="Magento\Catalog\Api\ProductMediaAttributeManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/media/:imageId" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/media" method="POST">
Expand All @@ -223,15 +223,15 @@
<route url="/V1/products/:productSku/media" method="GET">
<service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>

<!-- Group Price -->
<route url="/V1/products/:productSku/group-prices/" method="GET">
<service class="Magento\Catalog\Api\ProductGroupPriceManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/group-prices/:customerGroupId/price/:price" method="POST">
Expand All @@ -251,7 +251,7 @@
<route url="/V1/products/:productSku/group-prices/:customerGroupId/tiers" method="GET">
<service class="Magento\Catalog\Api\ProductTierPriceManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/group-prices/:customerGroupId/tiers/:qty/price/:price" method="POST">
Expand All @@ -276,7 +276,7 @@
<route url="/V1/categories/:categoryId" method="GET">
<service class="Magento\Catalog\Api\CategoryRepositoryInterface" method="get" />
<resources>
<resource ref="Magento_Catalog::categories" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/categories" method="POST">
Expand All @@ -288,7 +288,7 @@
<route url="/V1/categories" method="GET">
<service class="Magento\Catalog\Api\CategoryManagementInterface" method="getTree" />
<resources>
<resource ref="Magento_Catalog::categories" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/categories/:id" method="PUT">
Expand All @@ -314,13 +314,13 @@
<route url="/V1/products/:productSku/options" method="GET">
<service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/options/:optionId" method="GET">
<service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/options" method="POST">
Expand All @@ -346,19 +346,19 @@
<route url="/V1/products/links/types" method="GET">
<service class="Magento\Catalog\Api\ProductLinkTypeListInterface" method="getItems"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/links/:type/attributes" method="GET">
<service class="Magento\Catalog\Api\ProductLinkTypeListInterface" method="getItemAttributes"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/links/:type" method="GET">
<service class="Magento\Catalog\Api\ProductLinkManagementInterface" method="getLinkedItemsByType"/>
<resources>
<resource ref="Magento_Catalog::catalog"/>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/products/:productSku/links/:type" method="POST">
Expand All @@ -384,7 +384,7 @@
<route url="/V1/categories/:categoryId/products" method="GET">
<service class="Magento\Catalog\Api\CategoryLinkManagementInterface" method="getAssignedProducts" />
<resources>
<resource ref="Magento_Catalog::categories" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/categories/:categoryId/products" method="POST">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogInventory/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<route url="/V1/stockStatus/:productSku" method="GET">
<service class="Magento\CatalogInventory\Api\StockRegistryInterface" method="getStockStatusBySku"/>
<resources>
<resource ref="Magento_CatalogInventory::cataloginventory"/>
<resource ref="anonymous"/>
</resources>
</route>
</routes>

This file was deleted.

46 changes: 23 additions & 23 deletions app/code/Magento/Quote/etc/webapi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@
<route url="/V1/carts/:cartId" method="GET">
<service class="Magento\Quote\Api\CartRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts" method="PUT">
<service class="Magento\Quote\Api\CartRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/" method="POST">
<service class="Magento\Quote\Api\CartManagementInterface" method="createEmptyCart"/>
<resources>
<resource ref="Magento_Sales::create" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId" method="PUT">
<service class="Magento\Quote\Api\CartManagementInterface" method="assignCustomer"/>
<resources>
<resource ref="Magento_Sales::create" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/selected-shipping-method" method="PUT">
<service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="set"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/selected-shipping-method" method="GET">
Expand All @@ -46,13 +46,13 @@
<route url="/V1/carts/:cartId/shipping-methods" method="GET">
<service class="Magento\Quote\Api\ShippingMethodManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
</resources>
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/items" method="GET">
<service class="Magento\Quote\Api\CartItemRepositoryInterface" method="getList"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/items" method="POST">
Expand All @@ -64,91 +64,91 @@
<route url="/V1/carts/items/:itemId" method="PUT">
<service class="Magento\Quote\Api\CartItemRepositoryInterface" method="save"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/items/:itemId" method="DELETE">
<service class="Magento\Quote\Api\CartItemRepositoryInterface" method="deleteById"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/selected-payment-methods" method="GET">
<service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="get"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/selected-payment-methods" method="PUT">
<service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="set"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/payment-methods" method="GET">
<service class="Magento\Quote\Api\PaymentMethodManagementInterface" method="getList"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/billing-address" method="GET">
<service class="Magento\Quote\Api\BillingAddressManagementInterface" method="get"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/billing-address" method="POST">
<service class="Magento\Quote\Api\BillingAddressManagementInterface" method="assign"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/coupons" method="GET">
<service class="Magento\Quote\Api\CouponManagementInterface" method="get"/>
<resources>
<resource ref="Magento_SalesRule::quote" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/coupons/:couponCode" method="PUT">
<service class="Magento\Quote\Api\CouponManagementInterface" method="set"/>
<resources>
<resource ref="Magento_SalesRule::quote" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/coupons" method="DELETE">
<service class="Magento\Quote\Api\CouponManagementInterface" method="remove"/>
<resources>
<resource ref="Magento_SalesRule::quote" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/shipping-address" method="GET">
<service class="Magento\Quote\Api\ShippingAddressManagementInterface" method="get"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/shipping-address" method="POST">
<service class="Magento\Quote\Api\ShippingAddressManagementInterface" method="assign"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/order" method="PUT">
<service class="Magento\Quote\Api\CartManagementInterface" method="placeOrder"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/carts/:cartId/totals" method="GET">
<service class="Magento\Quote\Api\CartTotalRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Sales::sales" />
<resource ref="anonymous" />
</resources>
</route>
<route url="/V1/customer/:customerId/cart" method="GET">
<service class="Magento\Quote\Api\CartManagementInterface" method="getCartForCustomer"/>
<resources>
<resource ref="Magento_Catalog::products" />
<resource ref="self" />
</resources>
</route>
</routes>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

/**
* API permissions tab for integration activation dialog.
*
* TODO: Fix warnings suppression
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements
\Magento\Backend\Block\Widget\Tab\TabInterface
Expand Down
Loading

0 comments on commit 1afbe7e

Please sign in to comment.