Adding new REST URL: Unable to convert object into response content

Hello everyone,

I am trying to upgrade openmrs-module-webservices.rest by adding REST Web Service URLs for ConceptStopWord object. Its necessary to finish this ticket, issue ticket for this problem is here.

I’ve forked webservices module and tried to add new URL by following openmrswiki documentation, but it seems that ConceptStopWord is somekind different than example in this documentation.

My code adds new URLs to Swagger documentation, but:

  • It doesn’t provide POST methods
  • Returns THIS when I try to fetch all ConceptStopWords

-> My fork URL

Any feedback will be really helpful! Tomek

Didn’t we remove ConceptStopWord from platform 1.11 and above?

@dkayiwa, ConceptStopWord is still used. It is ConceptWord that was removed and replaced by the Lucene index in 1.11.x.

@tmarzeion I think the error is caused by the webservices.rest framework not being able to create a ref representation. You extend DelegatingCrudResource, which in contrast to MetadataDelegatingCrudResource does not implement convertToRef. The way to fix it is to provide a description for the ref representation in addition to full and default representations in getRepresentationDescription.

1 Like