I want to create rest resources for CRUD operations on some entities. I am following the pattern I saw in PopCommerce and UDM. We define a entity, create a rest resource, where we define the method and operation.
Is there any other way to do it, simplify it even more. Like I could have a flag in the entity definition, if I set it to true it supports standard methods and operations of GET, PUT, POST and DELETE.
If such feature does not exist, Is it wise to implement it ?
There are a few alternatives, the most similar to what you are describing are the general entity endpoints under the /rest path. The best docs for that are in the comments of that screen file: