Should we deprecate getRepresentationDescription, getCreatableProperties?

restws
Tags: #<Tag:0x00007fb857ae0df0>

(Gayan Weerakutti) #1
  • getRepresentationDescription(Representation rep)
  • getCreatableProperties()
  • getUpdatableProperties()

These methods are used to define representations of a resource. These were earlier being used in webservices.rest module to construct the Open API spec. But now these are no longer being used , since we use the alternative APIs: getGETModel, getCREATEModel, getUPDATEModel for documenting resources.

If the old getRepresentationDescription, getCreatableProperties, and getUpdatableProperties methods are not being used anywhere else, we could deprecate those, so that we don’t need define them when introducing a new resource. I’m not sure if they are being used in openmrs-core.

FYI:

These methods are defined in DelegatingResourceHandler interface in OpenMRS REST module.

@dkayiwa @pascal @bholagabbar


(Daniel Kayiwa) #2

My understanding is that these methods are also used to guard against trying to create or update a property that one is not supposed to. Which therefore means that they are still in use. :slight_smile:


(Gayan Weerakutti) #3

In that case, lets keep them. :slight_smile: