I have two custom field
Category in Magento 2 to store the menu icons.
I tried to override
\Magento\Catalog\Model\Category\Tree prepareCollection() + getTree() to include the custom fields, but Magento in Magento\Webapi\Controller\Rest processApiRequest() line 308 converts the array and remove the elements that don't have getters in `Magento\Catalog\Api\Data\CategoryTreeInterface'.
My search results didn't give me anything. Does anyone know how to append custom attributes to the API result ?