on magento 2, i want to return a custom object on my custom id, i have a code like this on the file Hz Clients Api TransactionInterface.php
so when on the api method rest I select the first option then it will come back
HzClientsApiDataFirstOptionDataInterface object and if i select the second option then it will come back
HzClientsApiDataSecondOptionDataInterface, is it possible to do this at rest api magento 2?
NOTE: I can not use the projection exception because the output format of the projection exception is different from the required one.