The reason is that the host name of the Swagger Spec is invalid. The problem possibly is in here, which always returns the ip of the localhost (127.0.0.1).
I think the simplest solution will be to simply omit host, and schemes params from the spec as suggested in here. API Host and Base Path
Omitting host and scheme
host and scheme can be omitted for a more dynamic association. In this case, the host and scheme used to serve the API documentation will be used for API calls. For example, if Swagger UI-based documentation is hosted at https://api.example.com/apidocs/index.html, “try it out” API calls will be directed to https://api.example.com.
BTW I’m not really sure what do you mean by ‘REST API root url’ .
I was talking about the webservices.rest.uriPrefix global property mentioned here.
This is used elsewhere in the REST module (e.g. when generating links in resources) to let you use a different URI than what the request is reporting. So maybe the correct fix is to use that GP in generating the swagger spec also.
(Or maybe leaving it blank will work fine. I don’t know if that’s allowed, or anything about swagger specs myself.)
Here it is probably returning http://192.168.1.100/openmrs. As 192.168.1.100 shouldn’t be used as the host param of the spec, we should replace it with either servers domain name or the remote ip.
May be @pascal will have an idea whether we should omit these (host and schemes) or not.
The value of webservices.rest.uriPrefix is supposed to be the external IP that consumers of the REST API would use. I.e. it should be set to http://yourdomainname.org/openmrs.