I have created an extension attribute for a product.
<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
<attribute code="product_options" type="Sample\Module\Api\Data\ProductOptionInterface" />
</extension_attributes>
So I am able to set product_options
to the product.
But when I request using API
http://10.16.16.216/example/magento/rest/all/V1/products/mypsku
Then JSON response is no contained my extension attribute. product_options
My plugin
<type name="Magento\Catalog\Api\Data\ProductInterface">
<plugin name="set_product_options" type="Sample\Module\Plugin\Catalog\ProductOption"/>
</type>
ProductOption