In apex you can create your own REST services quite simply:
@RestResource(urlMapping='/DUMMY/v1/*')
global class REST_Service {
@HttpGet
global static string getDummytMessage(){
return 'DUMMY DATA';
}
}
Salesforce does not allow such a class to be annotated as @ReadOnly
, I would like to understand and know why this is the case.
update: potentially there is no technical reason and its just not there out of a project management perspective. I've created an idea to put it on the radar.
@ReadOnly
annotation in Summer '20 (API Version 49). Nice!