extension_attributes.xml 1.0 KB

12345678910111213141516171819202122
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
  9. <extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
  10. <!--
  11. @deprecated Stock Item as part of ExtensionAttributes is deprecated
  12. @see StockItemInterface Should be used when you would like to "write" data into the data storage
  13. @see StockStatusInterface It should be used to "read" data for representation (on front-end)
  14. @see StockItemRepositoryInterface::save as extension point for logic customization
  15. -->
  16. <attribute code="stock_item" type="Magento\CatalogInventory\Api\Data\StockItemInterface">
  17. <resources>
  18. <resource ref="Magento_CatalogInventory::cataloginventory"/>
  19. </resources>
  20. </attribute>
  21. </extension_attributes>
  22. </config>