We’d like to implement a feature in the webservices.rest module, which creates read-only REST resources for classes extending OpenmrsMetadata with uuid, name, description, retired and audit fields, if such a resource wasn’t implemented for that class.
The use case is to expose all metadata provided by modules, authors of which didn’t implement REST resources.
Does anyone see any drawbacks in such approach?
This approach will have to take account of the possibility that the resources will be made updatable later, so the way it is implemented must be extensible. Just a suggestion.
This is a neat idea.
What are some examples of things you’d like to have automatically exposed? (I guess this is driven by the metadata mapping work, rather than a functional use case?)
Peeking at the reporting module as a thought example, all the query classes implement OpenmrsMetadata. So, would we want limited REST versions of these accessible? (I can’t think of why this would hurt.)