I have deployed Registry, Gateway and a microservice to Cloud Foundry. The microservice is available in registry and has also registered successfully in Gateway.
When trying to invoke calls in Swagger UI, the Swagger-generated url goes thus:
https://<microservice_route_with_port>/api/service_name/api/action_name
The above fails with "No response from server" error.
When invoking through Swagger UI, the URL that I am expecting - and which is validated to be work fine through Curl call - is:
https://<gateway_route_without_port>/service_name/api/action_name
BTW, direct service call through CURL or POSTMAN works fine too (by-passing the Gateway):
https://<service_route_without_port>/api/action_name
The application.yml file has the below configuration:
eureka:
instance:
prefer-ip-address: false
hostname: ${vcap.application.uris[0]}
- How can Swagger point to the gateway_url_without_port when deploying the microservices to PCF? (I have used jHipster cloudfoundry subgenerator to deploy the service to PCF so it ought to have handled this internally?)
- Do I need to point the baseUrl to be the same as Gateway in swagger-ui/index.html or elsewhere in the subgenerator code?
- Or, is this something that can be done in manifest.yml by specificying explicit routes?
Thanks!