here is the repo @dkayiwa GitHub - jnsereko/jnsereko-module-task1
Did you forget this?
Make your controller as simple (with nothing more) as the one you see here: Adding a Web Service Step by Step Guide for Module Developers - Documentation - OpenMRS Wiki
@dkayiwa
i have reverted my controller to be as Adding a Web Service Step by Step Guide for Module Developers - Documentation - OpenMRS Wiki and added a search handler but now the resource v1/task1/patient
is unknown
According to that documentation, the url should be in this format /ws/rest/v1/yourmoduleid/yourresourcename
You also need to drop /rest/" +
from your resource class.
Not related to the recursion error, getting all the patients is very inefficient, if there are thousands of patients not only will be slow, but you can consume all the memory. You should use a Query or Criteria to filter by mobile phone.