I added a product custom attribute (type text) through the admin interface.
Now I'm trying to save a product through the api rest but if I include the new attribute in the data passed I get this error:
Property "NeedsSync" does not have corresponding setter in class "Magento\Catalog\Api\Data\ProductInterface"
I've read about extension attributes but I'm not sure if that's the way to do this in particular case.
I've tried to add as extension attribute by adding a etc/extension_attributes.xml with this content:
<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
<attribute code="needs_sync" type="string">
</attribute>
</extension_attributes>
I've also read about the way of definig database table and join in the extension_attribute.xml for this attribute but I'm not sure this is the correct way, as this is a eav attribute for product entity so it is not a new table...