In Cuba, how to allow a method which is available in base interface for REST invocation? For example, consider the below scenario. The generate method is available in ReportService interface which is extended by the TestReportService interface.
@Service("something_TestReportService")
public class TestReportServiceBean implements TestReportService {
@Override
public List<ABC> generate() {
// return a list of ABC
}
}
public interface TestReportService extends ReportService<ABC> { }
public interface ReportService<T extends BaseUuidEntity> { List<T> generate(); }
rest-services.xml:
<service name="something_TestReportService">
<method name="generate"/>
</service>
URL:
GET {{baseUrl}}/rest/v2/services/something_TestReportService/generate
This returns the below error when tested in Postman. However, it works fine when the generate method is included directly in TestReportService interface.
{
"error": "Server error",
"details": ""
}
Could you please assist me on how to get this working? Or if it is not supported by Cuba. Thanks in advance.