-
Type:
Bug
-
Status: Closed
-
Priority:
TBD
-
Resolution: Fixed
-
Affects Version/s: 2.12
-
Fix Version/s: 2.13
-
Labels:
-
Complexity:Low
We should stop returning NEED-TO-CONFIGURE within REST responses. If the base URI (webservices.rest.uriPrefix global property) is not defined, then we should use whatever information we have on hand (from ServletContext, PageContext, and, if necessary, the request itself) to infer the proper base URI (protocol + host + ":port" if not ":80" + base for web app).
Current behavior
Assuming demo.openmrs.org does not have a value defined for the webservices.rest.uriPrefix global property.
curl -u admin:Admin123 http://demo.openmrs.org/openmrs/ws/rest/v1/patient?q=van { "results": [ { "uuid": "c77c858d-3978-4135-8c4b-d85d34d3e811", "display": "10012R - dijk van John", "links": [ { "rel": "self", "uri": "NEED-TO-CONFIGURE/ws/rest/v1/patient/c77c858d-3978-4135-8c4b-d85d34d3e811" } ] } ] }
Expected behavior
Assuming demo.openmrs.org does not have a value defined for the webservices.rest.uriPrefix global property.
curl -u admin:Admin123 http://demo.openmrs.org/openmrs/ws/rest/v1/patient?q=van { "results": [ { "uuid": "c77c858d-3978-4135-8c4b-d85d34d3e811", "display": "10012R - dijk van John", "links": [ { "rel": "self", "uri": "http://demo.openmrs.org/openmrs/ws/rest/v1/patient/c77c858d-3978-4135-8c4b-d85d34d3e811" } ] } ] }
- resolves
-
RESTWS-447 Autogenerate Rest Web Services URI Prefix
-
- Closed
-